Salesforce lookup relationship has no relation with other records. It does not depend on any other objects, whereas a master-detail relationship has an association with other records.
Let us consider this with an example: Think of the “Agent’s Table”. It has few header data which are “Manager Assigned” and the “Agent name”. It also has more fields other than the above, for agent declaration such as “ID, First Name, Second Name”, etc. The ‘master’ Manager record holds the data of the header too. The others hold the agent declaration fields. Every other area has to connect to other master records. And the “Agent” has the master-detail relationship with the “Manager table
On the other hand, the lookup relationship is just a reference. It can be even blank or NULL. In the database, we can pull the data from particular fields based on the reference keys easily. Same way in Salesforce, the object reference is the basic segmentation in the data relationships.
Connecting different objects with each other to replicate a real-life scenario/business process is called a relationship.
In the following ways Salesforce connects the Objects:
Let us proceed with an example of an explanation of the relationship between “Objects”. Let us consider the manager & agent relationship in sales (For Lookup relationship).
Step1: Identify 2 “Objects”.
Step2: Decide on which Object the relationship should be, eg: Agent.
Note: Please follow the steps from Article: Salesforce App Development, Data Modeling in Salesforce and create necessary “Objects” including fields in it.
Step3: Decide the relation type - (eg: lookup relationship)
Step4: Create a relationship field.
After login to “Salesforce Org” >> Select the required app in the top right corner.
After selecting the desired app (eg: relationship app), Go to “Agents” Object which is already created, and select it. To the right of the screen, we have “Quick Access Menu” >> click on it and select “Fields”. Now, we can enter a new field to it with the “New” button.
Check Out Salesforce Tutorials
After Selecting “New” >> Step1: Choose the field type >> select “Lookup Relationship” next
Step2: Select “Related To” (for which field the “Agent Object” should be connected for relationship). >> Select “Managers” >> next.
Step3: Enter the details or rename the field based on the requirement (eg: Manager Assigned) >> next.
Step4: In this step, the access for the profiles is granted based on the requirement.
Step5: In this step, by default “The page layout” will be in selection (eg: Student Layout) >> next.
Step6: In this step, the list display for managers is added for the Object - “Agents”. We can rename the “Related List Label” - (eg: Agents List).
Now, add entries in the “Agents Object” where you can find the managers list to add for the particular agents. “Manager Assigned” >> click on magnifying glass for the list >> select the manager from the list >> “Save”.
Now, we have a scenario in which the Managers list for only desired managers will be available to select.
Manager Object Edit >> Search Layouts >> Lookup Dialogs >> Edit >> Manager Lookup Dialogs >> Available Fields >> Select Desired Field (Manager Field) bring it to right .
Save
Based on our requirement, we show the “Manager” accordingly by editing the particular field.
Steps: “Agents Object Edit” >> Lookup Filter >> Show Filter Settings >> Filter Criteria >> Select Field, Operator, Value/Field >> Filter Type >> Required / Optional >> Enable the filter >> Save.
Frequently Asked Salesforce Interview Questions & Answers
Now, click the “New” button in the “Agent Object” to add new records, and you can look at the changes made for only desired manager filter.
From the above figure, we can select “Sales Manual” >> Save. But, we can even select other manager types also by typing in the field.
Steps: Agent >> New >> Manager Assigned >> Type Required Manager Name(eg: Kaushik ) >> Save
By the above scenario, we can also select the managers not on the list as well.
With the lookup relationship, the connection/bonding between two objects is not possible.
In the next topics, we will discuss in detail about “MDR - Master-Detail Relationship”. Keep following us for more info on Salesforce Administration
Mindmajix offers different Salesforce certification training according to your desire with hands-on experience on Salesforce concepts
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
Salesforce Training | Dec 21 to Jan 05 | View Details |
Salesforce Training | Dec 24 to Jan 08 | View Details |
Salesforce Training | Dec 28 to Jan 12 | View Details |
Salesforce Training | Dec 31 to Jan 15 | View Details |
Arogyalokesh is a Technical Content Writer and manages content creation on various IT platforms at Mindmajix. He is dedicated to creating useful and engaging content on Salesforce, Blockchain, Docker, SQL Server, Tangle, Jira, and few other technologies. Get in touch with him on LinkedIn and Twitter.