+ Start a Discussion
UgNderUgNder 

Standard Lookup relationship field behavior

Hello All,

 

Today I have observed that contact record get deleted whenever related account is deleted. Can anyone tell me how this is taken place on standard relationship. As we are allowed to select additional option in creating custom lookup relation field(http://developer.force.com/releases/release/Summer12/lookup+relationship+enhancements). 

 

Thanks is Advance.

Ashish_SFDCAshish_SFDC

Hi Yugender,

 

Child is deleted only if it has the master detail relationship with the Master when the master record is deleted. 

 

In Salesforce by Default Accounts and Contacts have a Lookup relationship. 

 

Navigate to the path below and check only Account - Contacts relationship, 

 

Setup | Build | Schema | Clear All | Select Standard Account and Contact | Observe the link and the description when you hover on to the link. 

 

Regards,

Ashish

 

 

UgNderUgNder

Ashish,

 

Yes, I am aware of the available relationship data types.  Can you confirm when you delete account record with salesforce native relationship between account & contact, does contact record will retain in system?

 

In my observation contact record get deleted yesterday.

Ashish_SFDCAshish_SFDC

Hi Yugender, 

 

Account and Contact have both kind of relationship, they behave as a Master Detail even though they look like a Look up relation in UI. 

You can create a contact without an account and such contacts are private so you won't be able to use them in reports and all. This shows that it is a Look up relation.

If you have created a contact with account and you delete that account then contact will be deleted, this shows that it is in Master-Detail relationship.

 

For more info see the links below, 

https://success.salesforce.com/answers?id=90630000000gx2aAAA

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=relationships_considerations.htm&language=en

 

http://www.salesforce.com/us/developer/docs/dbcom_soql_sosl/Content/sforce_api_calls_soql_relationships.htm

 

Regards,

Ashish

UgNderUgNder

Ashish,

 

Thanks for quick turn with the valuable information. But, here still I am looking for salesforce note on this functionally as I never come across. If you provide that would be great in effort.

 

Thank you very much my friend.