KELL Solutions and KnowledgebaseGeneral Salesforce Resources Helpful Configuration Tips & TricksHow to bring a field from a related record to an opportunity record

How to bring a field from a related record to an opportunity record

In this example, we're going to create a custom field on the opportunity that displays a value from a related contact record through a lookup field on the opportunity that goes to the Donor. However, you can follow these steps to create a custom field for any record that is related through a parent object (see definition of parent object below).

What values can I bring in to an opportunity record?

When we say "parent" record, we mean a record that is referenced as a lookup on the opportunity. So for example, I can reference any field on Contact because there's a lookup field to contact on the opportunity:

What values can I bring in to an opportunity record?

However, I can't reference any fields from a related object that sits underneath the main record.

Create the Custom Field

Navigate to Setup > Customize > Opportunities > Fields

Create the Custom Field

Click New.

Select Formula as the Data Type and click Next button.

Give the field a label and tab to complete the name.

Select Formula Return Type that matches the field you're bringing over, in this case it's Currency.

Make sure the Advanced Formula tab is selected and click Insert Field.

Any field that can reference other objects will have a > after its name. When you click on the field, you see all the fields on the related object. You can click on > up to 5 levels deep.

Find the exact field you want to reference and click the Insert button.

The full API name of the field will automatically fill in.

Click Next to go to the next screen.

Leave the Profile settings as-is (or decide if any profiles should not have access to this field)

Decide if you want the field on a layout and click Save.