Skip to main content

Dynamics 365 for Supply Chain Management: XQuery error from incorrect syntax in maps

Updating to TrueCommerce integration for Dynamics 365 FSCM Version 2.30 or above? Learn about the document Maps XQuery Error and what you can do to address it.

Support avatar
Written by Support
Updated over a week ago

Overview

Updating the TrueCommerce integration (TCEmbedded EDI) for Dynamics 365 for Finance and Supply Chain Management (FSCM) to Version 2.30 or newer may cause some existing EDI document maps within Dynamics 365 FSCM to:

  • generate an error when a document import/export is attempted

    • most commonly, an error can occur on maps containing concatenated lists that are missing offset parentheses; these will fail following the update

    • most likely, these issues will be encountered with EDI 850s built from a TrueCommerce-provided template between May 14, 2025-August 30, 2025; an EDI 812 built from a TrueCommerce template; or other maps that have been modified or edited

  • result in a stopped process

This is an outcome 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.

Before upgrading to the latest version of TrueCommerce integration for Dynamics 365 FSCM, slated for availability on October 6, 2025, 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.

A close-up of a document

AI-generated content may be incorrect.

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.

A screenshot of a computer

AI-generated content may be incorrect.

Validation Steps

To avoid stopped processes or errors if you perform this update, it is ideal that you check your EDI document maps; however, ALL documents should be validated.

To identify whether any of your maps include incorrect syntax:

  • Deploy the update to your Test environment

  • Browse to the EDI Maps

    • Modules > EDI > Settings > All inbound document maps

    • Modules > EDI > Settings > All outbound document maps

  • Use the new Validate functionality to identify issues.

    • To validate all maps, select them all, then click the Validate button.

      • All maps with issues will become highlighted.

  • To view the specific error for a single map, select one of the highlighted maps, then click the Validate button.

  • Update your maps in Test and Production.

    • You will likely need to reach out to TrueCommerce to assist with updating maps.

    • You can 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.

  • Deploy the update to your Production environment.

Remediation

Maps that fail with 'XQuery: expected "else"...' errors are the result of the concatenated list (2 nodes within a single 'if' statement) missing the parentheses, highlighted in green in the following image example.

A screenshot of a computer

AI-generated content may be incorrect.

To remedy this issue, parentheses must be added. To do this:

  1. Download the map with the error.

  2. Locate the error within the map.

    1. Search for ">," (Ctrl-F ">,") to identify where potential errors may exist.

    2. Ensure the section is encapsulated in parentheses.

  3. Update the map in Dynamics 365 FSCM.

  4. Run the Validate function again to ensure all map errors are resolved.

rev. 9/25/25

Did this answer your question?