AgileApps Support Wiki Pre Release

External Data Sources

From AgileApps Support Wiki
Revision as of 01:33, 14 May 2014 by imported>Aeric (→‎Settings)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GearIcon.png > Objects > {object} > External Data Sources

About External Data Sources

An External Data Source lets you access a collection of related records from an external data store. Those records can then be displayed in the Related Information section of an object record.

Considerations
  • Records retrieved from an external data source are display-only. They are fetched each time the record is displayed.
  • To store local copies of data (rather than retrieving it every time the record is displayed):
  1. Invoke a Web Service to retrieve and store the external data.
  2. Invoke the Web Service from a Rule Action to determine when the data fetch occurs.
Sample Use
A customer service application is used to manage customer complaints. When the Customer record is displayed, it can display a list of recent orders retrieved from an external order-tracking application.

Working with External Data Sources

Prerequisites

  • A Web Service must be configured to supply the records that will be accessed.

Adding and Editing an External Data Source

To add or edit an External Data Source:

  1. Go to [File:GearIcon.png]] > Objects > {object} > External Data Sources
  2. Click on an existing data source, or click [New External Data Source] to create a new one.
  3. Modify settings below, or click [Delete] to remove it.
  4. Click [Save].

Settings

Title
The text that identifies the data source in a listing.
Name
Internal name used to access the data source. Populated automatically from the title, but can be modified when the service is created. (Thereafter, it is fixed.)
Web Service
Choose the Web Service that will retrieve records for the user to choose from.
Record Element
In the hierarchy of data returned from the Web Service, specify the element that contains record data. (Generally, there will be multiple records, and this will be a repeating element.)
For example, the platform API that retrieves user data sends back a data structure like this one, in which <user> is the record element:
<syntaxhighlight lang="xml" enclose="div">

<platform> <user> <field1>...data for user 1..</field1> <field2>...</field2> ... </user> <user> <field1>...data for user 2..</field1> <field2>...</field2> ... </user> ... </platform> </syntaxhighlight>

That structure is shown in the platform like this, so you choose --user as the record element:
<syntaxhighlight lang="xml" enclose="div">

platform --user


field1


field2


...

</syntaxhighlight>

Input Mapping
Specify the values to deliver to the web service:
Use Object Field - Select a field in the record from which the External Data Source is invoked.
Use Fixed Value - Hardcode a value.
Use Expression - Specify a combination of fields, values, operators, and functions.
For each choice, specify which Web Service input gets the value.
Click the plus icon (+) to add another parameter. Click the minus icon (-) to remove one.
Output Mapping
Select output parameters coming back from the web service.

For each parameter, provide the column heading to display when the records are shown in a grid.

Click the plus icon (+) to add another parameter. Click the minus icon (-) to remove one.

Using an External Data Source in a Form

To use an External Data Source:

  1. Go to GearIcon.png > Objects > {object} > Forms > {form}
  2. In the sidebar, click New Related Information.
  3. Fill in the settings:
    • Information Source - Choose External Data Source
      The remaining list of options changes to reflect your selection.
    • External Data Source - Choose the External Data Source that will supply the records.
    • Title - Provide the title to be displayed in the form for the Related Information section.
    Learn more: Related Information