Pages

Showing posts with label Contact. Show all posts
Showing posts with label Contact. Show all posts

Wednesday, December 3, 2025

Salesforce: Campaign Member Deletion

Contact or Lead Deletion

When a Contact or Lead used in a Campaign Member is deleted, all Campaign Members for that lead or contact will also be deleted.

Undeleting the Contact or Lead from the Recycle Bin will restore all Campaign Members for the Contact or Lead, including the Status. However, the Last Modified Date and By of the Campaign Member record will be updated with the timestamp of when the Contact or Lead is undeleted, along with the name of the user who performed the undeletion. The Campaign Member ID will be restored to the original Campaign Member ID. 


Campaign Deletion

When a Campaign is deleted, all Campaign Members associated with that Campaign will also be deleted.

Undeleting the Contact from the Recycle Bin will restore all Campaign Members for the Campaign, including the Status. However, the Last Modified Date and By of the Campaign Member record will be updated with the timestamp of when the Campaign is undeleted, along with the name of the user who performed the undeletion. The Campaign Member ID will be restored to the original Campaign Member ID. 


CampaignMember Deletion

When a Campaign Member record is deleted, it is not sent to the Recycle Bin, so it cannot be restored. Vote for this idea.


Bonus: In the CampaignMember object, there are LeadId, ContactId, and LeadOrContactId fields. For a Lead in Campaign Member, when the Lead converted to a Contact:

  • The LeadOrContactId will be updated from LeadId to ContactId
  • The LeadId will not be changed
  • The ContactId will be populated with the Contact ID


Tuesday, November 22, 2016

Salesforce: Duplicate Management on Cross Object Duplicate Rules

Ten months ago, I blog about standard Salesforce Duplicate Management feature. This is standard feature under Data.com, but you do not need to have Data.com license to use this.

In this blog, I would like to share more about Duplicate Management on Cross Object Duplicate Rules.
Example: Email should be unique across Contact and Lead. While within the Contact and Lead itself, there are also other parameters that consider as duplicate in both Lead or Contact.

Lead duplicate matching rule:
- First Name + Last Name + Company
- Email

Contact duplicate matching rule:
- First Name + Last Name + Account
- Email

Solution:
1. Two matching rules in both Contact and in Lead

Contact: to match First Name + Last Name + Company OR Email

Lead: to match First Name + Last Name + Account OR Email

Contact: to match Email only for Lead cross object check

Lead: to match Email only for Contact cross object check


2. One duplicate rule in both Contact and in Lead

Contact duplicate rule, only can add one matching from each object


Lead duplicate rule


Note:
When edit record, Duplicate Rule will kick-in only when you update field related to fields defined in Matching Rule.

In this sample I select Fuzzy for the matching rule for First Name and Last Name, for example: Bob and Robert is considered as duplicate. But since we configure with "Allow" on create or edit, it will allow user to Save (Ignore Alert), but we can report on this with custom report type.




Reference:



Thursday, October 13, 2016

Salesforce: Contact Sharing Setting

When Account sharing rule is Private, options for Contact sharing will be: Private or Controlled by Parent only.

Use case with following sharing setting:
- Account: Private
- Contact: Controlled by Parent

For Account that user suppose do not have access to, but if any Contacts that user owned are linked to the Account. Contact Owner will be able to access the Account (read-only). But, this does NOT apply for indirect contact linked to Account via Related Contact to Multiple Account relationship.

Sample: screenshot below is all accounts visible to user:



and this is all contacts visible to user:



When user received a contact link to the account that user has no access "Google", in this sample "Mann, Saman", user will be able to see that contact. Furthermore, if the Account have multiple Contacts, user will be able to see all Contacts for that Account, in sample below "Li. Linda", even user does not own the contact:



Because now user own a contact Mann, Saman which is linked to Google account, user will be able to read Google account, furthermore user will also able to access Li, Linda although not owned by the user, because user have read access to the Account.




Notes:
1. Contact Owner will NOT able to link his/her Contact to an Account if the user do not have read access. The same also applicable for Related Contact to Multiple Account feature.

2. If your Organization-Wide Default for Contact is set to Controlled by Parent, you will not see Sharing button in Contact page layout.

3. All access to the contact is determined by the user's accessibility to the Account for that Contact.
But, since Contact is a special standard object with owner field (different with normal M-D relationship), contact have Owner. Even Contact sharing setting is set to Controlled by Parent, contact owner will be able to edit contact, and this would not related to the user accessibility to the Account.


Side notes related to Opportunity:
If Account is Private, this will cause Opportunity become Private.
The same with Contact, Opportunity Owner will be able to access (read-only) Account because Opportunity is linked to Account.


Reference:


Wednesday, October 12, 2016

Salesforce: Relate Contact with Multiple Accounts

In Summer 16 release, Salesforce introduces a feature to relate Contact with Multiple Accounts. The good thing is this feature is applicable for both Classic and Lightning UI, and in Salesforce1 as well. In Winter' 17 this feature even gets better, see this release notes.
  • Compact Layouts are now supported
  • Validation Rules are now supported
  • Triggers are now supported
  • Account-contact relationships can now be viewed


When you enable this feature, all of your existing relation between Contact and Account will not change, and they would become "Direct" relation - Account directly lookup from Contact will be called Direct. There will be a new related list called Related Contacts for Account Page layout, and Related Accounts for Contact Page layout.

You can see the Direct information from the new "Related Contacts" related list in Account Page layout, or "Related Accounts" related list in Contact Page layout. Personally, I would remove existing Contacts related list in Account, so users do not confuse with two almost similar related lists. You should modify Related Contacts related list to add all existing fields from Contacts and add Direct.


Setup
  • Navigate to Setup | Accounts | Account Settings
  • Enable "Allow users to relate a contact to multiple accounts"
Once enabled, you can define following actions:



Related Contacts related list from Apple Soft account page layout:



Related Accounts related list from a Contact page layout name Kim Bon:


You can add Custom field and Field Dependency for Account Contact Relationship from Setup | Customize | AccountsAccount Contact Relationship | Fields


Security Model

Add Relationship
All user (with read access to the Account) able to Add Relationship.
Click "Add Relationship" button from Related Contacts (in Account) or Related Accounts (in Contact), then fill in the account-contact relationship information.

Edit Relationship
Only user able to edit contact will be able to Edit Relationship.
Click View Rel (in Salesforce Classic) or View Relationship (in Lightning Experience) link. Then click "Edit Relationship" button.

Remove Relationship
Only user able to edit contact will be able to Remove Relationship.
Click Remove link and OK button to confirm.


Object
The object name for this is "AccountContactRelation", this is different with the old "AccountContactRole", which no longer supported in Lightning.


Reference:



Friday, December 18, 2015

Salesforce: Lead Source fields

When adding new Contact or Lead to a CRM system, you would like to note how you get know to that person? That's why by default Salesforce provide standard field or Lead Source is 4 main objects below, and they are picklist fields. You can customize the values based on your organization business model.
  1. Lead - Lead Source
  2. Account - Account Source
  3. Contact - Lead Source
  4. Opportunity - Lead Source
Over the time, you may modify the lead source values accordingly, but to note that: the values of 4 fields above in 4 objects above are in sync, this mean, if you add a new Lead Source value in Lead, it will copy to other objects, the same when you edit, delete and re-order values.

When you convert a Lead to Account, Contact and Opportunity, the conversion value of Lead Source from Lead will bring to Contact and Opportunity Lead Source.


Reference:


Saturday, June 8, 2013

Salesforce: Private Contact & Person Account

Private Contact
By default, Salesforce allow Contact do NOT link to Account, unless you set Account as required in Contact Page Layout or Validation Rule.

Although Account sharing rule is Public (Read Only or Read/Write), for a Contact without linked to Account, regardless what is the Contact sharing rule, it is considered as Private contact, meaning: only contact owneruser with View All Data and View All [on Contact objectpermission able to see the Contact, while all other users will not able to see the contact (even if the user copy and paste Contact URL, he will get error message: Insufficient Privileges), and the contact will also not shown in the search result and report.

Sharing rules and workflow rules do not apply to private contact, you also cannot manually share and enable self-service for those contacts, both buttons will not be visible.

So in summary, it is not a good idea to leave Contact without Account. You can request Salesforce Support to enable Person Account for such scenario. Using an account as place holder is not a good idea as well, as the number of contacts linked to that place holder account growth, it will cause data skew issue.


Person Account
If you enable Person Account, contact sharing in Organization-Wide Default for Contact will be automatically change to Controlled by Parent and this is not editable. So, if you just enable Person Account, Organization-Wide Default for Contact will be changed to Controlled by Parent, this will remove all existing contact sharing rules and manually shared contacts.




Page-level ad