# FetchXML

**FetchXML** defines your request to the database (your "query for data", not unlike a SQL query) by specifying which Entity Set you would like to query (eg opportunity, account, contact etc), and the **fields** you would like to be made available on each entity that the query returns in its results. It controls how the data is filtered, and how you want that data to be sorted.\
\
This is a very neat way of providing data from within Dynamics for use within Keyfax scripting.  \
\
There is a wealth of documentation and FetchXML examples on the internet; for more information [click here](https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-fetchxml-construct-query).

{% hint style="info" %}
**TIP** The [XrmToolbox](https://www.xrmtoolbox.com/) contains useful FetchXml tools to assist in query development (particularly syntax checking).
{% endhint %}

The **Active FetchXML view** provides a a summary of all available FetchXML queries#, e.g:

<figure><img src="/files/WxgkZMOKHOm8oWlFYWu8" alt=""><figcaption></figcaption></figure>

Although several example **FetchXML** look ups are shipped with KeyNamics and may provide some guidance, crafting more complex **FetchXML** statements may prove a little more tricky so if any further assistance is required, please [Contact Us](/links/support.md).

### See Also

* [Creating FetchXML queries](/product-suite/keynamics/configuration/fetchxml/creating-fetchxml-queries.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keyfax.biz/product-suite/keynamics/configuration/fetchxml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
