Basic DataSources
Last updated
Last updated
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.
Define each property of the internal DataSource.
Map data retrieved from an internal DataSource to a Lookup or Line-item.
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.
βοΈ
These are operations to map data imported via an internal DataSource to a Lookup or Line-item.
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
βοΈ
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.
In the DataSource settings, specify the Source Object as PricebookEntry.
(optional) Use the Query Wizard to create conditions for the query (same as SOQL WHERE
statement).
To match the PricebookEntry data to the Products, use the following settings:
Source Field: Product2Id
Target Field: Id
Key: true
Add an Action to configure a Lookup column to display the unit price together with the Product data.
Source Field: UnitPrice
Target Field: SBLDVirtual1 (Virtual fields reference)