The Internationalisable Data Source / I18NConfigurableDataSource

The configuration of the Internationalisable Data Source is specified by an XML-File based on a fixed default XML-Scheme.

General Structure

Every Data Source consists of any number of DataSets. Each DataSet is a single query against the CRM system. The following general types of data sets are available: - DataSet - FetchXmlDataSet

OverviewofallavailableDataSources

Available data sets


In addition DataSets can also be nested hierarchically to read dependent data. Dependent data could be, for example, in case of a template for a company, all contacts to a company or all offer items to an offer and from all product details to each offer item.

DataSet

<i18n:DataSet Entity="contact" ItemName="Contact" MultipleItems="true">
    <i18n:Columns>
        <i18n:Column>firstname</i18n:Column>
        <i18n:Column>lastname</i18n:Column>
    </i18n:Columns>
    <i18n:Filter>
        <filter>
            <condition attribute='lastname' operator='eq' value='Müller' />
        </filter>
    </i18n:Filter>
</i18n:DataSet>

A DataSet corresponds to the selection of a record type (Entity) from theCRM system. Optional filters regulate to which records the selection is restricted. Either all attributes of a data record (no specification of the column node) or only specific attributes (columns) can be selected.

XML-Output

The datasource creates an XML document as output where each node corresponds to a single data record with the selected field as subordinate nodes. The contents of a DataSet are always represented within an XML node whose name is specified with the attribute ItemName. The name must begin with a capital letter! If multiple records are output by the query (MulipleItems = "true"), a higher-level XML node with an appended 's' is generated for all nodes.

<Contacts>
    <Contact>
        <firstname />
        <lastname />
    </Contact>
</Contacts>

Necessary Attributes

  • ItemName: The name of the XML element that is generated in the output. The name must begin with a capital letter!
  • Entity: The logical name of the CRM entity that is selected. This is e.g. Contact, account, invoice, etc.
  • MultipleItems (Boolean): Determines whether only one or more records are returned in the output. For indirect references, the value must be True.

The FromAttribute and ToAttribute attributes are ignored for DataSets at the very first level (DataSet).

Optional Attributes

  • Limit: By default, the data source outputs a maximum of 50 dependent records. A value of 0 returns all available records. Any other value sets the upper limit.
  • UniqueItemsOnly: Only unique records are returned by the database (Unique with regard to the selected columns).

Elements

DataSets can contain additional subelements:

  • Columns: Specifies the columns to return. If this is missing, all columns are returned. The column specification is case sensitive; Use only lower case.
  • Filter: Here you can specify conditions based on the FetchXml description language.
  • OrderBy: Allows sorting by multiple columns ascending and descending.
  • Variable: Freely definable variables. These can be used later in filters or conditions.
  • Condition: Conditions for variables. DataSets are only executed when all conditions are met.
  • LinkedDataSet: A subordinate DataSet
  • LinkedFetchXmlDataSet: A subordinate FetchXmlDataSet

The parameters for the filtering are also available for Filter. Compare FetchXmlDataSet.

Linked Data Sets - nesting of DataSets

You can nest DataSets hierarchically(LinkedDataSet or LinkedFetchXmlDataSet) to read dependent data. Dependent data can be e.g. All the contacts of a company. The relations could be arbitrarily 1:1, 1:n or n:m. In a nesting, all subordinate records are read where the value from the FromAttribute of the parent DataSet matches the value of the ToAttribute of the child LinkedDataSets. For example:

account.accountid = contact.parentcustomerid

In this case, all the contacts of the respective company has entered in the field "Parent Customer" are output for each company of the parent data record:

<i18n:DataSet Entity="account" ItemName="Account" MultipleItems="true">
    <i18n:LinkedDataSet Entity="contact" FromAttribute="accountid" ToAttribute="parentcustomerid" ItemName="Contact"
        MultipleItems="true" >
        <i18n:Columns>
            <i18n:Column>firstname</i18n:Column>
            <i18n:Column>lastname</i18n:Column>
        </i18n:Columns>
    </i18n:LinkedDataSet>
</i18n:DataSet>

Necessary Attributes

  • ItemName: The name of the XML element that is generated in the output. The name must begin with a capital letter!
  • Entity: Name of the dependent entity.
  • FromAttribute: Name of the field that has the value for the link from the entity of the parent DataSet.
  • ToAttribute: The name of the field referenced in the dependent entity of the child LinkedDataSet.
  • MultipleItems: Determines whether only one or more records are returned in the output. For indirect references, the value must be True.

Optional Attributes

  • Limit: By default, the data source outputs is at most 50 dependent records. A value of 0 returns all available records. Any other value sets the upper limit.
  • UniqueItemsOnly: Only unique records are returned by the database (Unique with regard to the selected columns).

Elements

LinkedDataSets can contain the same Subelements as DataSets, in particular, other LinkedDataSets or LinkedFetchXmlDataSets.

FetchXmlDataSet

For FetchXmlDataSets, users have all the degrees of freedom that Advanced Search provides in the CRM user interface. You can download the respective XML description of your query and copy it directly to your FetchXmlDataSet node using the FetchXML menu item in the extended search. The Xml root tag displayes the result of your FetchXml query.

FetchXMLDataSet
FetchXmlDataSet example


<i18n:DefaultDataSet>
    <i18n:LinkedFetchXmlDataSet ItemName="Account" MultipleItems="true">
      <i18n:FetchXml>
        <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
        <entity name="account">
                <attribute name="name" />
            <attribute name="telephone1" />
                <filter type="and">
                    <condition attribute="revenue" operator="gt" value="150000" />
                    <condition attribute="address1_country" operator="eq" value="Deutschland" />
                </filter>
                <link-entity name="territory" from="territoryid" to="territoryid" alias="aa">
                    <filter type="and">
                        <condition attribute="name" operator="eq" value="Baden-Württemberg" />
                    </filter>
                </link-entity>
        </entity>
       </fetch>
      </i18n:FetchXml>
    </i18n:LinkedFetchXmlDataSet>
</i18n:DefaultDataSet>

Since a query is initially unrelated to the document, and it is possible to load hundreds of thousands of records without filtering, the records with variables and conditions are further restricted.

Elements

  • FetchXml: Contains the FetchXML statement
  • Variable: Variables can later be reused in filters or conditions.
  • Condition: Conditions for variables. DataSets are only executed when all conditions are met.
  • LinkedDataSet: A subordinate DataSet
  • LinkedFetchXmlDataSet: A subordinate FetchXmlDataSet