Friday, January 1, 2016

Salesforce Tutorial Creating Look-up Relationships, Master Relationships, and Junction Objects

Creating Look-up, and Master-Detail Relationships with Junction Objects

By Elizabeth Kilgore


In Salesforce a relationship is the connection between to objects. Look-ups and Master-Detail Relationships are two very important relationships and Junctions can be used to link objects together. Creating Look-ups, Master-Details, and Junction Objects is a basic part of data modeling within Salesforce.

Look-up Relationship


 
Click Setup and go to the Quick Findbox and search for Objects, under Create click Objects


 For this example, we will use the Custom Object named Candidate to find the Object listed under labels as Candidate click it 

 Scroll down to Custom Fields and Relationships click new. 

In the drop down list select the circle named Lookup Relationship and click next.  

In the relationship drop down list choose the word User, click next 


In the Field Label Box type Hiring Manager, the field name should populate on its own when you press the tab key, and Candidates should already be in the Child Relationship Box, click next keep all the defaults and click next on the next two pages and then click save

 

Junction Objects

This Junction will be used later to demonstrate how to create a Master-Detail Relationship.
Click Setup go to the Quick Findbox search Objects click New Custom Objects


In the Label for this example, we will enter Job Posting and under Plural Labels type in Job Postings the Object name will populate by itself if it does not just add and underscore for example it should look like Job_Postings 

Scroll down and select the box labeled Launch New Custom Tab 

on the next page click the Tab Style drop down

this screen will pop up and give a list of buttons, select the Train leave all defaults on the next two pages and click save.


Master-Detail Relationship

Click Setup go to the Quick Findbox and type Objects under Create click Objects

Click the label Candidates



Scroll to Custom Fields and Relationships, click New



Select the circle labeled Master-Detail Relationships
Click next



In the Related To drop down scroll to Job Posting and click next.

Select the box read/write checked click next kept all defaults on the next two pages and click save on the last page. 

No comments:

Post a Comment