function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ZTZT 

Object relationship

How do objects in force.com relate to each other? How are Contracts related to Contacts for example? Could someone recommend any literature explaining this?

Thanks.

All Answers

SAPOCSAPOC

Objects in salesforce are related by having look -up relationships or Master-Detail relationships.You can also have Many-to -Many relationships.

 

Account and contacts have master -detail relationship i.e if account is deleted contacts are also deleted.

 

Contacts and contracts are not related. You can create one by defining contact look-up on contracts object.

Shashikant SharmaShashikant Sharma

There are different kind of relationship in salesforce

1. Master detail : Tightly Bind , Required to provide reference in child  to insert a child , if parent gets deleted child also gets deleted that is cascaded delete. Sharing rights on child are determined by rights on parent.

 

2.Lookup Relationship : Loosely bind , not required to provide reference , like Contact has lookup relation with Account , it can exists with or without a reference of account , no cascaded delete , sharing rights of child are independent of parent.

 

3. Self : if a object has lookup relationship with itself ,  like account has a parentID which has parent account record reference.

 

4. many to many : In this we have junction object

    Like a Object

    Contact

    Location

 

    then junction object ContactLocation will be having master detail with both contact and location where Contact and Location would be master and ContactLocation will be child.

 

 

 

ZTZT

Thank you very much. These are very helpfull and things are starting to make sense.

Shashikant SharmaShashikant Sharma

Your welcome , I hope you were pointing toards my reply. :)

Ankit AroraAnkit Arora

@Shashikant

 

Is it??? The post creator knows very well which post is to be marked and which not to be. Also info from your side are no where stand outside the links provided by me. Hope you got my point :)

 

 

Thanks
Ankit Arora

 

Shashikant SharmaShashikant Sharma

@ankit

 

Links provided by you might have provided more info but the info I provided was also correct and enough for making base . It was just a welcome comment to him if in any case he thanked me too. :) , I hope thanking him did not hurt you mate :)

Even if ur reply got marked others can say welcome as we also tried to help him.

 

 

Ankit AroraAnkit Arora

No problem at all. Hope you know what you have written in your previous post. No offences, happy posting.

 

 

Thanks
Ankit Arora

 

ZTZT

Please guys this is not necessary. I was thanking everyone for guiding me and show my appreciation for your willingess to share and handhold newbies like me. Again thank you all.

Ankit AroraAnkit Arora

Never mind, me and Shashikant are true buddies :)

 

 

Thanks
Ankit Arora