Skip to main content
CRMSalesforce CRM

Salesforce LookUp Fields Based on Another Field’s Value

By February 24, 2023No Comments

As a follow up to our recent blog on Salesforce lookup fields, we now want to show you how to how to base these fields on another field’s value.

What Does It Mean To Base Salesforce Lookup Fields On Another Field’s Value?

When creating a lookup field you are essentially relating the field to another object (e.g, table) for its values.  They can be used to lookup a value on related lists, be useful for relating objects for custom report types, or create a relationship for tracking to name a few.

LookUp fields can use filters to drill down on specific data to display in the picklist or they can be based on the value of another field, or a combination of both.

Using another field’s value to determine another field’s choices can be helpful.  The best example of this is the Related To and Name fields on many Salesforce pages.  Once you choose an Account in the Related to value, the Name lookup will only accept Contacts related to that Account (in most organizations).  The same principle can be applied to other lookup relationships such as from Orders to Products or Opportunities to Orders.

How Can I Add A Lookup Field Based On Another Field’s Value?

For this example we will expand on the Partner Look Up field on the Account object to assign the Technology Partner Account for the client.  Now we not only want to relate the Partner company but we also want to relate the representative working with client.

  1. Click on SetUp (Gear Icon) and then click on the Object Manager
  2. Click on the object you will be adding the Lookup field to. For this example we are using the Account object.
  3. Select Fields & Relationships and then click the New
  4. Select Lookup Relationship from the Data Type list and click Next.
  5. Select Contact from the Related To dropdown and click Next.
  6. Enter the following:
    1. Field Label – Partner Rep
    2. Field Name will auto populate
    3. Add a Description and/or Help Text is desired
    4. Leave the Child Relationship Name as is
  7. Click Show Filter Settings in the Lookup Filter Section.

  1. Click in the field box and choose Current Record then the field to filter on (e.g., Technology Partner).

  1. Choose equals for the operator and Field for the Value/Field.
  2. Because we are using a Field as the equal to value, click in the value box and choose Current Lookup then the lookup name and then the AccountID field.

  1. Choose if the field will require a value.
  2. Select to Active so the filter can be used. Click Next.

  1. Choose who will see the new field and do not make it read only. Click Next.
  2. Choose which Account Layouts will display this field. Click Next.
  3. Choose which Vendor Account Layouts will display this field. Click Save.

Navigate to the page you added the field to and test it.

You can adjust the field’s location on the page as well what layouts have the field by clicking on Page Layouts in the Object Manager for the object at any time.  You can adjust the field’s properties at any time by clicking Fields & Relationships.

Please contact us at info@marksgroup.net for any Salesforce questions or support you need.  Feel free to comment below. We’d love to hear your thoughts!

Dena Falek

Author Dena Falek

More posts by Dena Falek

Leave a Reply

5 Great Alternatives to SalesForce.com

Free Whitepaper Download

Learn more about 5 options that are better CRMs for small business

DOWNLOAD WHITEPAPER

Skip to content