How to Enable Debug Mode in Tax Calculation Service for Dynamics 365 Finance
When troubleshooting the Tax Calculation Service in Dynamics 365 Finance, you can enable a debug mode that outputs detailed calculation input and result data.
How to Enable Debug Mode
- Append
&debug=vs%2CconfirmExit&to the URL of the Application Object Server (AOS), then refresh the page. - When you select Sales tax to calculate sales tax, a text file named
TaxServiceTroubleshootingLog.txtis automatically opened.
The log file contains the TaxableDocument (the input sent to the tax calculation service) and the calculation parameter, along with the results returned and any exception information useful for troubleshooting.
Log File Structure
The output file contains three main sections:
Tax calculation input JSON — The TaxableDocument containing the header and line data from the source transaction, along with the calculation parameters (e.g. ContinueOnErrors) and any adjustment lines.
Tax calculation result JSON — The taxDocument returned by the service, containing calculated tax codes per line, measures (e.g. List Code), tax registration ID, any errors, the solution ID, and whether a partial success occurred.
CorrelationId — A unique identifier for the calculation request, useful when raising support tickets with Microsoft.
Example Output
// Tax calculation input JSON
{
"TaxableDocument": {
"Header": [
{
"Lines": [
{
"Transaction Line ID": "5816,68719677391"
}
],
"Transaction Header ID": "2022,68719506302"
}
]
},
"Parameter": {
"ContinueOnErrors": true
},
"Adjustment": {
"Lines": {}
}
}
// Tax calculation result JSON
{
"taxDocument": {
"Header": [
{
"Lines": [
{
"Tax Codes": { }
}
],
"Measures": {
"List Code": "EUTrade"
},
"Tax Registration ID": null,
"Transaction Header ID": "2022,68719506302",
"Errors": null
}
]
},
"solutionId": "b51e0025-cbbe-4d37-bf0b-90d7be4f214d|1",
"isPartialSuccess": false
}
// CorrelationId
"21f3a8a1-ee9a-477b-b44e-b8ec79e74d16"
Source: How to enable debug mode in Tax Calculation – Microsoft Learn