How to create LookUp relationship in Salesforce || By Rajesh Chatterjee || Delipat

Поділитися
Вставка
  • Опубліковано 17 жов 2024
  • Lookup Relationship in Salesforce
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    𝐏𝐥𝐞𝐚𝐬𝐞 👍 𝐋𝐢𝐤𝐞, 𝐂𝐨𝐦𝐦𝐞𝐧𝐭 𝐚𝐧𝐝, 𝐒𝐡𝐚𝐫𝐞 𝐭𝐡𝐞 𝐕𝐢𝐝𝐞𝐨.
    Lookup Relationship in Salesforce
    In previous articles/videos, we created four custom objects- Head office, outlet, revenue and employee for our custom app- Homely Food. In this article, let us try and create relationships between them.
    Relationships help in linking the objects among each other to enable capturing data effectively. For example, every outlet and head office needs a manager. The manager is an employee. Hence, we need to establish relationships between head office and employee and outlet and employee.
    Similarly, every head office and outlet has revenue details to be captured. Therefore, we need to establish relationships between head office and revenue and outlet and revenue.
    Let us understand what type of relationship suits our needs the most. Our Salesforce admin, Rajesh, will be creating relationships accordingly.
    What is Lookup relationship in Salesforce?
    A relationship between objects where the child object is not dependent on the parent object is known as Lookup relationship in Salesforce.
    In Lookup relationship,
    Child record does not get deleted when the parent record is deleted.
    Child records can be created without a parent record.
    Thus, the child object remains independent of the parent record.
    For example, One employee is the manager of multiple outlets. If the employee leaves the organization and his record is deleted, the record of multiple outlets is not deleted. Instead, another employee becomes the manager. Here, the outlet (child object) is not dependent on the employee (parent object).
    Features of lookup relationship in Salesforce
    A child object is a standalone object in a lookup relationship. It is not completely dependent on the parent object.
    The child object does not impact the parent object in any manner.
    The parent field can be left unfilled in a lookup relationship. By default, it is not mandatory to fill the parent field in the child object. However, the settings can be changed and made mandatory.
    One child object can have multiple lookup parent objects. The total number of lookup relationships that can be created is 25. (Salesforce changes the number with its every yearly update. You can refer to help.salesforce.com for the current number.)
    A lookup relationship is generally a one to many relationship.
    Standard objects can be child objects when creating a lookup relationship.
    Child records are not deleted when parent records are deleted.
    When to choose Lookup relationship and Master-detail relationship?
    When two objects are independent of each other and deletion of parent record does not affect the child object, then Lookup relationship must be created.
    For example, One employee is the manager of multiple outlets. If the employee leaves the organization and his record is deleted, the record of multiple outlets is not deleted. Instead, another employee becomes the manager. Here, the outlet (child object) is not dependent on the employee (parent object).
    When two objects depend on each other and deletion of parent records leads to deletion of child records, then Master-detail relationship must be created.
    For example, the relationship between the Head office (parent object) and outlet (child object) is a master-detail relationship. If the company shuts the head office and deletes its records, all the outlets under that head office will also be shut down, and their records will also be deleted.
    How to create a Lookup relationship in Salesforce?
    To create a Lookup relationship, a relationship field in the child object is created with the data type as lookup. We will be creating a lookup relationship between the outlet and employee objects.
    Steps to create Lookup relationship in Salesforce
    Identify the child and parent object between the objects. The lookup relationship field is created in the child object.
    Among outlet and employee objects, the outlet is the child object, and the employee is the parent object. It is because the outlet record will be creating but the employee record will be created (we discussed this in previous articles/videos)
    Go to setup. Click on the object manager.
    Go to the object detail page of the outlet object
    Select Fields & Relationships on the sidebar.
    Click on the New Button
    Select the Data type as LookUp relationship. Click Next.
    Choose the employee object as the related to(parent) object.
    Enter the Label and name for the lookup field as outlet manager.
    Click next, next and save
    #salesforce #sales #crm #marketing #salesforceadmin #salestips #business #salestraining #saleslife #salesman #salesfunnel #salesforcedeveloper #salesforcecertified #salesteam #b #salesforcetraining #salescoach #salesforceohana #salesforcedevelopers #salesforcepartner #salesmanager #salesforceconsulting #hondaindonesia #salesperson #salesalesale #salesforcejobs #cloud #salesforceconsultant #salesstrategy #salesrep

КОМЕНТАРІ • 5