Basic DataSources

If you simply want to query related objects, use the basic data source settings.

Select the related object for the lookup or line item, and map the fields from the data source to the lookup or line item fields.

For example, if the Lookup object is specified as Product2 and you want to display the unit price from a PricebookEntry, you can use an internal data source to look up the PricebookEntry that meets the criteria, and display the product and unit price together.

  • Properties

    Define each property of the internal DataSource.

  • Actions

    Map data retrieved from an internal DataSource to a Lookup or Line-item.


Properties

Item
Description
Req.

Source Object

Specify the Salesforce objects that you want to source data from.

✔️

Query

Click the Wizard button to open the Build Query layout. You can use the Query Wizard to easily build queries by searching for the correct fields to use.

Active

Turns the DataSource on or off. It must be active to be used.

✔️

Evaluation Event

When adding a DataSource for the Line-item Editor, an Evaluation Event needs to be specified.

  • On Initialization: Executes when a new Line-item is added.

  • On Loading: Executes when the Line-item screen is loaded.

  • Before Save: Executes before a Line-item is saved.

These are operations to map data imported via an internal DataSource to a Lookup or Line-item.

✔️

Actions

These are operations to map data imported via an internal DataSource to a Lookup or Line-item.

Item
Description
Req.

Action Order

Specify the order that mappings are carried out.

✔️

Source Field

Specify the field to map from the internal DataSource object.

✔️

Target Field

Specify the Lookup or Line-item field to map to.

✔️

Key

If true, this mapping will define how to match records between the Lookup or Line-item objects and the DataSource object. For example, if the Lookup is specified as Product2 and you import PricebookEntry as the DataSource, the key mapping would connect the field Product2Id from PricebookEntry (source field) and the field Id from Product2 (target field): PriceBookEntry.Product2Id = Product2.Id

✔️

Example

For example, when setting the lookup object as a product, it is often necessary to display price information along with it. However, in Salesforce, pricing is typically managed in Pricebook Entries. Since Pricebook Entries are child objects of Products, they cannot be fetched directly using formula fields.

To solve this issue, you can use a data source to query the Pricebook Entry for each product and display the information in the lookup selector or line item editor.

  1. In the DataSource settings, specify the Source Object as PricebookEntry.

  2. (optional) Use the Query Wizard to create conditions for the query (same as SOQL WHERE statement).

  3. To match the PricebookEntry data to the Products, use the following settings:

    • Source Field: Product2Id

    • Target Field: Id

    • Key: true

  4. Add an Action to configure a Lookup column to display the unit price together with the Product data.

Last updated

Was this helpful?