Creating FetchXML queries
Last updated
Was this helpful?
Last updated
Was this helpful?
This is an example of a FetchXml query which retrieves fields from the contact and account entities. It contains a single bookmark which is supplied by a mapping entry, in this case, one that pulls the contactid
from the current form. Items are returned as a comma separated string:
A name which describes the purpose of this FetchXml query.
The query itself including any bookmarks. Note that valid bookmarks are: PARENTID - this is useful if the form intending to launch Keyfax has a parent, e.g. Contact or Account etc. BOOKMARK#1 to BOOKMARK#3 - these will be replaced with the values specified in the (up to) 3 Bookmark values specified below. These bookmarks must appear as above in UPPER CASE in your Query..
If the query returns more than one value, this separator can be used to split items. These values will be concatenated into a single field/node specified by the Mapping. In the Mapping that uses this FetchXml, if multiple target nodes are specified each returned item is stored separately.
These fields are lookups from which you can select other mapping entries in order to satisfy the FetchXml query. in the example above, the mapping entry 'Current Form Contact id' is used. This is a 'dummy' mapping entry; because the Target is null, this merely provides data to complete the FetchXml query and won't be sent to Keyfax (unless required):
Note that the FetchXml query will only return attributes that have been explicitly requested in each attribute statement e.g. <attribute name="myattribute" />. Where are queried, some attibutes will be ignored, unless they are contained in the query's attribute list.