• WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG
    • WHO WE ARE
    • WHAT WE DO
      • Salesforce
        • Implementations
          • Sales Cloud
          • Service Cloud
          • CPQ
          • Field Service Lightning
          • Field Service for SMEs
        • Developments
          • Salesforce Customization
          • Custom Application Development
          • AppExchange Product Development
        • Migrations
          • Classic to Lightning Migration
          • Other Systems to Salesforce Migration
        • Integrations
      • Data Science
        • BI Solutions
        • AI/ML solutions
        • Agentic AI
    • HOW WE DO
      • Delivery Model
      • Our Works
    • REACH US
      • Contact Us
      • Careers
    • BLOG
  • [email protected]
  • (+91) 44-49521562
Merfantz - Salesforce Solutions for SMEs
Merfantz - Salesforce Solutions for SMEs
  • WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG

Part I – 4.How to Create Junction Object in Salesforce

  • November 2, 2017
  • Merfantz Editor
  • Salesfore Training Course, SFDC Training Part I
  • 0

A junction object is a custom object with two master-detail relationships, and it is the key to making a many-to-many relationship.Let us assume we are having HR’s recruiting app and now we are going to create a junction object called Job Posting.

A job posting fits into the space between positions and employment websites. One position can be posted many times, and one employment website can have many job postings, but a job posting always represents a single position on a single employment website.

In essence, the Job Posting object has a many-to-one relationship with both the Position and the Job Posting Site objects. Through those many-to-one relationships, you create a many-to-many relationship between the Position and Job Posting Site objects.

Create a Custom Junction Object
  1. From Setup, click Object Manager.
  2. Click Create, select Custom Object, and fill in the details.
    Field Value
    Label Job Posting
    Plural Label Job Postings
    Record Name Job Posting Number
    Data Type Auto Number
    Display Format JOBPOST-{0000}
    Starting Number 1
  3. Leave everything else as is, and click Save.
  4. Next, create the master-detail relationship between Job Posting and Position.
    1. While still viewing Job Posting in Object Manager, click Fields & Relationships, then New.
    2. Select Master-Detail Relationship as the Data Type.
    3. Click Next.
    4. For Related to, select Position.
    5. Click Next.
    6. For Field Label, enter Position.
    7. Click Next, Next, Next and Save & New.

Now fill in the details for a master-detail relationship between Job Posting and Job Posting Site.

  1. Select Master-Detail Relationship as the Data Type.
  2. Click Next.
  3. For Related to, select Job Posting Site.
  4. Click Next.
  5. For Field Label, enter Job Posting Site.
  6. Click Next, Next, Next and Save.
Modify the Page Layouts

Next, add fields to the Job Posting Site related list on the Position page layout.

  1. From Setup, click Object Manager.
  2. Click Position, then Page Layouts.
  3. Click Down arrow next to Position Layout and select Edit.
  4. Scroll down to the Job Postings related list, and click Wrench icon in the header to edit it.Junction Object
  5. From the Available Fields section, select
    • Job Posting Site: Status
    • Job Posting Site: Technical Site
  6. Click Add.
  7. From the Selected Fields section, select Job Posting: Job Posting Number and click Remove.
  8. Click OK, then click Save.

Finally, add fields to the Position related list on the Job Posting Site page layout.

  1. From Setup, click Object Manager.
  2. Click Job Posting Site, then Page Layouts.
  3. Click Down arrownnext to Job Posting Site Layout and select Edit.
  4. Scroll down to the Job Postings related list and click Wrench icon in the header to edit it.
  5. From the Available Fields section, select
    • Position: Status
    • Position: Title
  6. Click Add.
  7. From the Selected Fields section, select Job Posting: Job Posting Number and click Remove.
  8. Click OK, then Save.

Now let’s test what you’ve just done by creating a Job Posting record.

  1. Click App Launcher iconto open the App Launcher, then click Recruiting.
  2. Click the Positions tab, then New, then enter the details of the new position.
    Field Value
    Title Super Sales Rep
    Department Sales
    Approval Status Approved
    Location US
    Job Description Sales rep to join the AW Computing team serving the eastern region of AMER
  3. Click Save.
  4. Click the Job Posting Sites tab, then New, and enter the details.
    Field Value
    Site Name Lots-O-Jobs
    Job Posting Site www.Lotsojobs.com
    Status Active
  5. Click Save.
  6. On the Job Posting Site record you just created, click the Related tab.
  7. On the Job Postings related list, click New. For Position, search for and select Super Sales Rep and click Save.

This training blog is much more useful to learn about junction object.

Author Bio

Merfantz Editor
+ Recent Posts
  • August 4, 2023
    How to Setup CRM Analytics for Financial Services Cloud
  • August 2, 2023
    How to Get Started with Salesforce Hyperforce - Merfantz
  • July 28, 2023
    Health Cloud Mastery: Salesforce Trailhead for Effective Healthcare CRM
  • July 26, 2023
    How to integrate Data cloud and Marketing cloud In Salesforce
  • Previous Part I – 3.How to Create Object Relationship in Salesforce
  • Next Part I – 5.How to Create a Custom Object Tab in Salesforce
Merfantz Technologies is a leading Salesforce consulting firm dedicated to helping small and medium enterprises transform their operations and achieve their goals through the use of the Salesforce platform. Contact us today to learn more about our services and how we can help your business thrive.

Discover More

Terms and Conditions
Privacy Policy
Cancellation & Refund Policy

Contact Info

  • No 96, 2nd Floor, Greeta Tech Park, VSI Industrial Estate, Perungudi, Chennai 600 096, Tamil Nadu, INDIA
  • (+91) 44-49521562
  • [email protected]
  • 9:30 IST - 18:30 IST

Latest Posts

Let Einstein Help You Build - Salesforce Flow
Let Einstein Help You Build – Salesforce Flow May 15, 2025
Mastering Attachment Compression for Salesforce Developers May 9, 2025
Salesforce API Integrations: Connect with Slack, Zoom, and Teams May 2, 2025

Copyright @2023 Merfantz Technologies, All rights reserved