If you use CRM.inferface or CRM.webservices to communicate with external applications, you can directly use queries from the CRM.web through an XQuery request.
<request ...> <xquery name="#QueryName#" type="32" /> </request>
Further information can be found in the CRM.Interface_AdministratorGuide_XXX.pdf.
While simple "query"-requests allow a "maxrecords" attribute to be specified, this is not possible with "xquery". The result will always be limited to 9.999 entries.
There is a global solution for all "xquery" requests. Open the settings.xml of your interface:
- ..\update.CRM\CRM.webservices << Vertical >>\ web\system\settings.xml
- ..\update.CRM\CRM.interface << Vertical >>\web\system\settings.xml
and insert the following configuration entry:
<settings> ... <maxRecords>100000000</maxRecords> ... </settings>
The parameter is of the integer type and negative values are interpreted absolutely ("-1" becomes "1").
The maximum value "int.MaxValue = 2.147.483.647" is also not recognized.
You must determine a value that fits your use cases.
If an invalid value is entered, the value 9999 is always used again.
Advantage of this solution:
The definition of a query is not "hidden" in external applications and causes unexpected problems when customizing the data model.
Instead, small modifications of the data model can be realized without changing the external application.
The function of the "chunked" requests is possible with xquery queries.
In this way, the load on the interface can be reduced and the external application can interact more efficiently with the CRM.
<request ...> <xquery name="#QueryName#" type="32" chunked="true" chunk_size="3000" /> </request>