Product(s): Foundry platform, ERPs
βArticle link: http://help.truecommerce.com/en/articles/12068796-dynamics-365-for-supply-chain-management-xquery-error-from-incorrect-syntax-in-maps
Overview
Updating the TrueCommerce integration for Dynamics 365 for Finance and Supply Chain Management (FSCM) to Version 2.29 or newer may cause some existing EDI document maps within Dynamics 365 FSCM to:
error
result in a stopped process
generate an error when a document import/export is attempted
This is a result of the stricter interpretation by the updated Saxon version for compliance with the official XQuery standard. Saxon is a third-party library that TrueCommerce uses for XQuery mapping of documents into and out of Dynamics 365 FSCM. TrueCommerce updated the Saxon version to the latest version in order to ensure supportability and compatibility.
Remediation Steps
To avoid stopped processes or errors if you perform this update, it is ideal that you check your EDI document maps. To identify whether any of your maps include incorrect syntax:
Deploy the update in your test environment
Test your document imports/exports
If any 'XQuery: expected "else"...' errors occur, you will need to fix the document maps that the errors apply to. The two most affected documents by this update are the Accounts Receivable (AR) Inbound EDI 850 and Inbound EDI 812; however, ALL documents should be validated.
Following is an example of the Error Report showing the XQuery Error.
For example, if the error is on an Inbound map for an EDI sales order document, as soon as you attempt to bring in an inbound EDI 850, the error will occur and display. The screenshot showing the Error, immediately below, is the Message detail form that is accessible by all EDI users. The error will always start with 'XQuery' and then describe the issue details that are causing the map syntax error.
Validate button Added
A new button is added to both the Inbound and Outbound Mapping forms so that you can validate your map without having to perform an Import. Clicking the Validate button will indicate if you have a map error, eliminating the need for you to first perform an import/export to see if it will work.
NOTE: There are several ways to get to the Inbound Maps or Outbound Maps forms within Dynamics 365 FSCM. To view them all (simplest paths), navigate to:
Modules > EDI > Settings > All inbound document maps; or
Modules > EDI > Settings > All outbound document maps
If you continue to have issues, create a Support Case by navigating to the Account Management > My Support Dashboard > New Support Case from the Foundry Menu and referencing the error message you are receiving.
rev. 8/29/25