Object Relationship

 Object Relationship In Salesforce.

Objects are related to each other with the help of primary key that uniquely identifies the record in table and serves as a foreign key in other table.In salesforce object can be related with each other by lookup,master-detail and with the help of junction object.

You have already created objects in Salesforce, how would you establish relationship beteween those objects below is the simple way to relate objects.

Object Relationship in general categrized as follows. 

  • 1 to 1 
  • 1 to Many
  • Many to Many
Salesforce Object Relationship
  •     Lookup Relationship  
  •     Master - Detail Relationship
  •     Self Relationship
  •     Heirarchical Relationship (User)
  •     Junction Object
Junction Object is used to implement many to many relationship in salesforce.We will discuss it in detail later.

Example : 1

Hint : Object Creation Goto Setup  -> Object Manager -> Create -> Custom Object

Create Pincode,District,City,State objects with below  fields  of type lookup.



This will helps you in estabilishing the relationship between these four objects,Now you will be able to find district,city,state depending on the pincode provided.And again you can find city , state depending on the selected district.





Comments

  1. very simple and easy way . thanks. plz elaborate process builder

    ReplyDelete

Post a Comment

Popular posts from this blog

Apex Salesforce: Count the associated child records to parent record