# Select Lookup Reference Field

Start by selecting the parent object, then move to the child object (line item), and finally configure the lookup object that the line item refers to. When defining the lookup object, you must select the field in the line item that references the lookup object.

### How to Set Up the Lookup Object

Let’s assume you are setting up the builder for OpportunityLineItem based on the Opportunity object. As shown in the object structure diagram below, OpportunityLineItem has two key relationships:

* **Opportunity**\
  The parent object of OpportunityLineItem, referenced via the `OpportunityId` field.
* **PricebookEntry**\
  The object referenced by OpportunityLineItem for product and pricing information, linked via the `PricebookEntryId` field.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FbRIGPONcLWJq0BtdqTNw%2FLineItem_%E1%84%80%E1%85%A2%E1%84%8E%E1%85%A6%E1%84%8B%E1%85%A7%E1%86%AB%E1%84%80%E1%85%A7%E1%86%AF_eng.drawio%20(2).png?alt=media&#x26;token=1d52a536-65c0-444d-9f59-43e5433781c3" alt=""><figcaption></figcaption></figure>

#### Step 1: Select the Parent Object

Choose **Opportunity** as the parent object.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FtAYTrEtIBpkBHx6RgY49%2Fimage.png?alt=media&#x26;token=45389443-5db1-4463-bdf9-9623b62e3e6a" alt=""><figcaption></figcaption></figure>

#### Step 2: Select the Line Item Object

Choose **OpportunityLineItem** as the line item object.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FhpMzRppTRwvizITvWtMR%2Fimage.png?alt=media&#x26;token=caa8280b-5c7a-46e7-93ae-95273bd86746" alt=""><figcaption></figcaption></figure>

#### <mark style="color:orange;">Step 3: Define the Lookup Object</mark>

Since **OpportunityLineItem references PricebookEntry**, select the <mark style="color:orange;">`PricebookEntryId`</mark> field in the line item object as the lookup reference field.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2F94t9Ao02rJB73xMi8Fq4%2FLookup_Reference_Field.png?alt=media&#x26;token=e53fc68d-20ab-478d-91b2-8a6008e55178" alt=""><figcaption></figcaption></figure>
