External data sources
Last updated
Last updated
External data sources should be used when you want to retrieve data from an external server and present it alongside data from a standard or custom Salesforce object. Since the datasource is accessed using a user-defined Apex class, you can retrieve data more flexibly compared to an internal datasource.
For example, if you want to retrieve real-time inventory numbers from an external system and display them on-screen alongside your product information, you can write REST API code in an Apex Class to do this.
Describes the properties to be configured when using an external datasource.
Before you can use an external datasource, you must write an Apex class. Your class must implement the SBLD.DataSourceService.Fetchable
interface provided in the package.
There are several properties to be configured when using an external datasource.
Before you can use an external datasource, you must write an Apex class. Your class must implement the SBLD.DataSourceService.Fetchable
interface provided in the package.
You must also implement the execute()
method in your class.
You can get information from the Parent or Lookup objects through the gets()
method in SBLD.DataSourceService.Parameter
To pass the result to the Line-Item Configurator, we use the class below.
Specifies an Action for each line in the target (Lookup or Line-item). An Action is an operation that maps a DataSource value to a Lookup or Line-item field.
setKeyValue(Object keyValue) Sets the Key value to find the target record for the Lookup or Line-item.
putSourceToTargetField(Object sourceValue, String targetField) Assigns a data source value to a Lookup or Line-item field.
Adds the mapped Action to the return value.
addAction(SBLD.DataSourceServiceAction action)
Adds an Action to the SBLD.DataSourceService.Result
instance.
Under construction! Contact us if you need further help.
Field name or area | Description | Req. |
---|---|---|
Select the type of external connection.
There are two ways to connect to external datasources.
Apex - use an Apex class that implements
the SBLD.DataSourceService.Fetchable
interface.
Flow - use an automatically executing Flow.
βοΈ
Enable
Enables the datasource. A disabled datasource will not be available when building custom lists.
Description
Provide a description of your datasource.
Key Field
Specifies which fields from the List object should be matched with fields from the datasource.
βοΈ
Parameters
If your datasource needs to be passed values from fields in the List object, select those fields here.
Input Variable
Output Variable
βοΈ
Select the parameter variables to pass to the Flow. If no parameters are required, leave unchecked. π‘ The displayed options are those marked "Available for input" in the Flow.
Select the variables to receive the results from the Flow. π‘ The displayed options are those marked "Available for output" in the Flow.