In Dynamics AX 4.0, there are two AIF actions that support retrieving data from an external system: QueryEntityKeys and QueryDocument. If a request message contains the QueryEntityKeys action, AX returns one ore more entity keys that match the query criteria specified in the request. If a request messages contains the the QueryDocument action, AX returns one or more documents that match the query criteria specified in the request.

 

As it ships, AX will return 1,000 records (each record being contained in an XML document) by default when one of these actions is used. If you want to increase the number of records returned, this is done on the Value mapping form.

 

 

  1. Go to Basic > Setup > Endpoints, select an endpoint and click Action policies.
  2. Select the action for which you want to define return document limits, and click Configure to open the Value mapping form.
  3. On the Setup tab, in the Limit number of documents field, select Yes to limit the documents returned by a query.
  4. In the Limitation type field, select Specified.
  5. In the Max number of documents field, enter the max number of documents to be returned.

 

If you want to specify that unlimited records can be returned, set the Limit number of documents field to No.

 

If you encounter issues in AIF while exchanging large documents (over 10 MB), you may need to make changes to either the request size in the Web.config (if you're using Web services) or the maxbuffersize registry key. For more information about doing this, there's an excellent KB article on PartnerSource. Note - you'll need a valid PartnerSource login to access it. Also, it's on a secure site, so you may need to log in to PartnerSource first before you can access the link.