# Linked objects setup

To implement the Line-item Configurator, you first need to specify a Parent object, a Line-item object, and a Lookup object.

{% hint style="info" %}
For example, if you want to build a configurator to allow you to add products to an opportunity, you would set the Parent object to the Opportunity object, the Line-item object to the Opportunity Product object, and the Lookup object to the PriceBookEntry object.
{% endhint %}

<figure><img src="/files/JuREkGv6Q5u1cBdhE3Iv" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="197">Item</th><th width="453">Description</th><th>Req.</th></tr></thead><tbody><tr><td>Parent Object</td><td>The object to which you want to add a line-item configurator, such as an opportunity, quote, or business trip. The line-item configurator will let you add lines (representing e.g. products or expenses) to this Parent object.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Line-item Object</td><td>The Line-item object is the Junction which connects the other two objects. For example, the OpportunityProduct, QuoteLineItem, OrderItem objects.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Lookup Object</td><td><p>This is the object referenced by the line-item, such as a product, customer, expenses etc.</p><p><br>💡 <strong>Tips</strong><br>In the case that you only want users to edit existing items, and not be able to add new line items, you can tick <strong>Block adding items</strong>. Otherwise the editor will include a Lookup Selector tool to add new items.</p><p>If you want to block only some items, you can specify the API name of a true/false API field.</p><p>You can also specify which fields the user can search through.</p><p>If you want to pre-filter the available options, you can write a SOQL filter using the API name of the Parent field in the Advanced Condition box. For example: <code>Product2.Name like '%Generator%'</code>.</p></td><td><mark style="color:red;">✔️</mark></td></tr></tbody></table>

### Line-item Object Advanced Setting

Settings for importing saved records from the Line-item Editor, including sorting and deletion control.

<figure><img src="/files/xjmAPGtRUmWgfoIPN5fy" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="202">Item</th><th>Description</th></tr></thead><tbody><tr><td>Order By</td><td><p>Sets the sorting when returning records for a saved line-item. Enter the <code>ORDER BY</code> clause in SOQL.<br></p><p>For example, if you want results to appear in descending date order, you can write <code>CreatedDate DESC</code>.</p></td></tr><tr><td>Delete Controller Field</td><td><p>This controls the deletion of Line-item records based on the specified field value. The field must be a Line-item field with a value of true or false.</p><p>For example, if you want to control the deletion of Line-item records based on a field in the Parent or Lookup object, you can create a Boolean-type formula field on the Line-item object.</p></td></tr></tbody></table>

### Lookup Object Filter

Controls how the user adds items in the Lookup Selector, including filters.

<figure><img src="/files/ROLOBbSSL20Bo7OGucZq" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="205">Item</th><th width="445">Description</th><th>Req.</th></tr></thead><tbody><tr><td>Keyword Field</td><td>Select the field which the user can use to search for Lookup records, for example a Product Name or Code.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Match Condition</td><td>Choose whether the user's search will return any values that contain the search string, or only values which start with exactly the search string. Default is "Contains".</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Order By</td><td><p>Sets the sort order for the search results.</p><p>Enter the <code>ORDER BY</code> clause in SOQL.<br></p><p>For example, if you want to search in ascending order by product code, you can write <code>ProductCode ASC</code>.</p></td><td></td></tr><tr><td>Advanced Condition</td><td><p>Specify a pre-filter condition to restrict the results users will see. Enter the <code>WHERE</code> clause in SOQL.</p><p>For example, if you want users to see only records that are active (field: isActive), you can write <code>IsActive = true</code>.</p><p>If you want users to only be able to see records with certain names or product codes, you could write something like this:</p><p><code>Product2.Name like '%Generator%'</code><br><br>💡 <strong>Tip</strong><br>If you want to specify a field value from the Parent object in your filter, you can bind it using <code>{$Parent.FieldName}</code>.<br></p><p>For example, if you want the user to only be able to look up records that match the currency of the Parent object, you could write something like this:</p><p><code>CurrencyIsoCode = {$Parent.CurrencyIsoCode}</code></p></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.smallbuilder.com/smallbuilder-line-items/setup/relate-objects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
