SaasGuru Logo

Flat 20% OFF on Salesforce Marketing Cloud and Data Cloud + AI Bootcamp 🎉– Offer Ends 30th Nov!

Flat 20% OFF on Salesforce Marketing Cloud and Data Cloud + AI Bootcamp 🎉– Offer Ends 30th Nov!
Salesforce Junction Objects Interview Prep Scenarios With Solution

Salesforce Junction Objects Interview Prep Scenarios With Solution

Junction Objects Scenario 1: Real Estate Agent and Property Assignment 

A real estate agency wants to manage their property listings. They have two custom objects: “Property” and “Agent.” They want to track which agents are responsible for selling or renting each property, and they also want to record the date when an agent is assigned to a specific property.

junction object scenarios

Solution

Create a junction object named “PropertyAssignment__c” that establishes a many-to-many relationship between “Property” and “Agent.” The “PropertyAssignment__c” object will have fields like “AssignmentDate” to store the date when each agent is assigned to a specific property.

Step 1: Configure Property Object  

Object Name: Property

API Name: Property__c

Object Description: Capture property details including Name, Property Type, Address etc.

Instructions to follow:

1. In your developer org, go to Object Manager and select Create > Custom Object.

Step 1: Configure Property Object  

 Step 1: Configure Property Object  

2. Name your object Property and set the plural label to Properties.

Step 1: Configure Property Object  

3. Provide a brief description for context.

4. Ensure the object is marked as Deployed.

Step 1: Configure Property Object  

5. Click Save to create the object.

Step 2: Configure an Address Custom Field on the Property Object  

Field Name: Address

Label:  Address

API Name: Address__c

Field Type: Text(Area) 

Object: Property

Description: Stores the address of the property.

Instructions to follow:

1. In the Object Manager, find the Property object and click on Fields & Relationships.

Step 2: Configure an Address custom field on the Property object  

2. Click New to create a new field and select Text as the field type.

Step 2: Configure an Address custom field on the Property object  

3. Label the field as Address and set the maximum length to 255 characters.

4. Provide a description, for example, “Stores the property’s address.”

Step 2: Configure an Address custom field on the Property object  

5. If the address must be unique and required, tick the respective checkboxes.

6. Skip default value settings, as it’s not needed for this setup.

7. Ensure the field is accessible to the System Admin profile.

Step 2: Configure an Address custom field on the Property object  

8. Confirm the field is added to at least one-page layout.

9. Click Save to complete the field creation.

Step 2: Configure an Address custom field on the Property object  

Your ‘Address’ field is now configured and will hold property addresses within your system.

Step 3: Configure Agent Object  

Object Name: Agent

API Name: Agent__c

Object Description: Capture real estate agents’ details including personal information, performance metrics etc.

Instructions to follow:

1. Go to the Object Manager and select Create > Custom Object.

2. For the object name and label, enter Agent.

3. Set the plural label to Agents to differentiate individual records.

4. Add a description that outlines the object’s use, such as “Capture real estate agent’s details.”

5. Scroll to the bottom and click Save to create the Agent object.

Step 3: Configure Agent Object  

Step 4: Configure an Email Custom Field on the Agent Object  

Field Name: Email

Label: Email 

API Name: Email__c 

Field Type: Email

Object: Agent 

Description: Stores the email of real estate agent.

Instructions to follow:

1. Within the Object Manager, locate and select your Agent object.

2. Click on Fields & Relationships and then on New to create a new field.

3. Choose Email as the field type from the options provided.

Step 4: Configure an Email custom field on the Agent object  

4. Name the field Email and provide a label with the same name.

5. Add a description for context, such as “The agent’s primary email address.”

Step 4: Configure an Email custom field on the Agent object  

6. Proceed by clicking Next, review your settings, and click Next again.

7. Finally, click Save to add the email field to your Agent object.

Step 4: Configure an Email custom field on the Agent object  

Step 5: Configure Property Assignment Object  

Object Name: Property Assignment

API Name: Property_Assignment__c

Object Description: Establishes a many-to-many relationship between “Property” and “Agent” objects.

Instructions to follow:

1. Return to the Object Manager in your developer org.

2. Click on Create, then select Custom Object to start a new object.

3. Label the new object as Property Assignment.

4. Set the plural label to Property Assignments for multiple records.

5. Provide a clear description, for instance, “Establishes a many-to-many relationship between ‘Property’ and ‘Agent’ objects.”

Step 5: Configure Property Assignment Object  

6. Click Save to create the Property Assignment junction object.

Step 5: Configure Property Assignment Object  

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

Field Name: Property Agent

Label: Property Agent 

API Name: Property_Agent__c 

Child Relationship Name: Property_Agents

Field Type: Master-Detail Relationship (related to the Agent object) 

Object: Property Assignment

Description: Establishes a link to the corresponding Agent for the Property.

Instructions to follow:

1. In the Object Manager, select your Property Assignment object.

2. Click on Fields & Relationships, then New to add a new field.

3. Choose Master-Detail Relationship as the field type and click Next.

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

4. Set the related object to Agent to establish the connection.

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

5. Label the new field as Property Agent and use the same name for the Field Name.

6. Describe the field as “Establishes a link to the corresponding agent for the property.”

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

7. Assign the child relationship name as Property Agents.

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

8. Proceed through the next prompts, ensuring the field name includes an underscore (Property_Agent).

9. Continue clicking Next to add the field to the page layout.

10. Click Save to finalize and create the master-detail relationship on the junction object.

Step 6: Configure a Property Agent Custom Field on the Property Assignment Object  

Step 7: Configure a Property Custom Field on the Property Assignment object  

Field Name: Property

Label: Property

API Name: Property__c 

Child Relationship Name: Property

Field Type: Master-Detail Relationship (related to the Property object) 

Object: Property Assignment

Description: Establishes a link to the corresponding Property.

Instructions to follow:

1. Access the Property Assignment object again within the Object Manager.

2. Click New in the Fields & Relationships section to create a new field.

3. Select Master-Detail Relationship and proceed by clicking Next.

Step 7: Configure a Property Custom Field on the Property Assignment object  

4. This time, choose Property as the related object to link to.

Step 7: Configure a Property Custom Field on the Property Assignment object  

5. Label this new field as Property and use the same name for the Field Name.

6. For the child relationship name, also use Property.

7. Provide a description, such as “Establishes a link to the corresponding property.”

Step 7: Configure a Property Custom Field on the Property Assignment object  

8. Click Next through the subsequent screens to confirm your settings.

9. Save your changes to create the master-detail relationship field.

Step 7: Configure a Property Custom Field on the Property Assignment object  

With this step completed, your junction object now has a ‘Property’ field, creating a direct connection to the property data within your system.

Step 8: Configure an Assignment Date Custom Field on the Property Assignment Object  

Field Name: Assignment Date

Label:  Assignment Date

API Name: Assignment_Date__c

Field Type: Date

Object: Property Assignment

Description: Capture the date when each agent is assigned to a specific property.

Instructions to follow:

1. Within the Property Assignment object in the Object Manager, click New to add a field.

2. Select Date as the field type and click Next.

Step 8: Configure an Assignment Date Custom Field on the Property Assignment Object  

3. Name the field Assignment Date.

4. Enter a description, such as “Captures the date when an agent is assigned to a specific property.”

Step 8: Configure an Assignment Date Custom Field on the Property Assignment Object  

5. Click Next to review your settings, then click Next again.

6. Click Save to add the Assignment Date field to your object.

Step 8: Configure an Assignment Date Custom Field on the Property Assignment Object  

The ‘Assignment Date’ field is now established, allowing you to track when agents are assigned to properties.

For more Junction Object Scenarios to practice, checkout saasguru’s Salesforce labs – 

5oIEEl1TXWx8DIc8uelmPVjMmO9CpKX2Nk HaZKlOSrjH8ZJfQvKgnJeAKii4lrEP6CiULRioZNe3cHbUqE1GEbLeUHayAErle9 VUl7Q1NQhUmp1ffXPGvzZYlAU9mgC X w7vfRI6DAOFy EFkMRc
 
Dive into Admin and Developer Mini Projects, tackle Interview Scenarios, and validate your skills in real-time. Say goodbye to guesswork and hello to assured progress with our interactive labs.
 

FpDdcVNpR71kJSzqK0LfKHZHud1w7UEFJ cyTKZ9W eHrmmkJhkgMXEt3rYfJaWcWtL345lSF 3XRV8UAZiGa0

Practice Salesforce scenarios and validate your skills directly within your developer org. With saasguru’s Salesforce Labs, you can engage in hands-on practice and validate each step of your journey in real-time.

saasguru Salesforce Labs: Real-time Projects for Practice

Explore saasguru’s Salesforce Labs to make learning interactive, practical, and instantly validating.

Table of Contents

Subscribe & Get Closer to Your Salesforce Dream Career!

Get tips from accomplished Salesforce professionals delivered directly to your inbox.

Looking for Career Upgrade?

Book a free counselling session with our Course Advisor.

By providing your contact details, you agree to our Terms of use & Privacy Policy

Unlock Your AI -Powered Assistant

Gain Exclusive Access to Your Salesforce Copilot

Related Articles

Humans of Salesforce – Mauricio Alexandre Silva

Discover Mauricio Alexandre Silva’s inspiring Salesforce journey, tips for success, and insights into the evolving ecosystem. Read now!

Salesforce India Achieves $1 Billion Revenue Milestone

Salesforce India achieves $1 billion revenue milestone, driven by AI, innovation, and digital transformation across industries. Read now!

Most Demanded Courses in IIT Kanpur in 2025

Explore IIT Kanpur’s most demanded courses in 2025, including Salesforce, AI, Data Science, and more. Read now!