Skip to main content

Create a Self Relationship with the Position Object

Create a Lookup Relationship

When members of Ling Wu’s HR team are looking at a position in their recruiting app, she would like each recruiter to be able to identify other open positions that require similar skills or have similar job descriptions. This will allow recruiters to more easily determine appropriate roles for candidates.

You can set this up for her by creating a lookup relationship. Lookup relationships link two objects together. You can link an object with another standard or custom object, or you can link an object with itself—that’s called a self relationship.

Start by creating a self relationship with the Position object.

  1. From Setup, click Object Manager.
  2. Click Position.
  3. Click Fields & Relationships, then New.
  4. Select Lookup Relationship as the Data Type.
  5. Click Next.
  6. In the Related To picklist, select Position.
  7. Click Next.
  8. Change the Field Label to Related Position.
  9. Change the Field Name to Related_Position.
  10. Click Next, Next, and Next.
  11. Change the Related List Label to Related Positions.
  12. Click Save.

Add Lookup Filters

Now add lookup filters by department and record ID, to help recruiters narrow their searches.

  1. Click Down arrownext to Related Position and select Edit.
  2. In the Lookup Filter section, click Show Filter Settings.
  3. Click Magnifying glass and select Related Position from the first column, Department from the second column, and click Insert.
  4. For Operator, select equals.
  5. For Value/Field, select Field.
  6. Click Magnifying glass and select Current Record: Position, then select Position: Department.

Now fill in the next row of filter criteria.

  1. Click Magnifying glass and select Position from the first column, Record ID from the second column, and click Insert.
  2. For Operator, select not equal to.
  3. For Value/Field, select Field.
  4. Click Magnifying glass and select Current Lookup: Related Position, then select Related Position: Record ID.
  5. For Filter Type, ensure Required is selected.
  6. For If it doesn’t, display this error message on save, enter The related position must be in the same department. You cannot relate a position to itself.
  7. Click Save.

[alt text: Accompanying screenshot showing filter criteria and error message

Now let’s test what you’ve just done by viewing a position in the Recruiting App.

  1. Click App Launcher iconto open the App Launcher, then click Recruiting.
  2. Click Positions, then New, then enter the details of the new position.
    Field Value
    Title Awesome Sales Rep
    Department Sales
    Approval Status Approved
    Location US
    Job Description Sales rep to join the AW Computing team serving the western region of AMER
  3. Click the Related Position field and select Super Sales Rep.
  4. Click Save.
  5. Notice that Super Sales Rep appears as a related position for Awesome Sales Rep. (You may need to refresh the page.)

Awesome Sales Rep page showing Super Sales Rep as Related PositionUsing relationships and filters, you’ve enabled recruiters to work more efficiently. Keep up the good work by creating custom fields.

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities