0% found this document useful (0 votes)
63 views14 pages

Dual Write - Troubleshooting - 001 - Overview

Uploaded by

babu thum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views14 pages

Dual Write - Troubleshooting - 001 - Overview

Uploaded by

babu thum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Dual Write – Troubleshooting - Overview

Contents
1. Overview................................................................................................................................ 2
2. Prerequisites .......................................................................................................................... 2
3. Lab steps ................................................................................................................................ 2
3.1. Collect a network trace (HAR file) .................................................................................. 2
3.1.1. Important topics in the Network trace for analysis ................................................... 4
3.2. Enable Plug-in trace in Dataverse .................................................................................. 5
3.3. Get the Plugin trace log generated ................................................................................ 6
3.4. Enable IsDebug mode .................................................................................................... 7
3.4.1. DualWriteErrorLog table ............................................................................................ 9
3.5. Disable performance enhancement .............................................................................. 9
3.6. Collect an Ax trace ....................................................................................................... 10
3.7. Import the collected Ax trace for analysis ................................................................... 13
4. TSG and references.............................................................................................................. 13
1. Overview
This topic provides general troubleshooting information for dual-write integration between
Finance and Operations apps and Dataverse, most specifically on traces and information to
collect.

During troubleshooting of a Dual write case, we will collect different traces and perform
different checks depending on your scenario and the action the customer is taking.

We can summarize as follows:

- Mapping configuration and mapping action (run, stop) in Dual write UI: Network trace
(HAR file): https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-
itpro/data-entities/dual-write/dual-write-troubleshooting#how-to-enable-and-save-
network-trace-so-that-traces-can-be-attached-to-support-tickets
- Initial sync: As overall It will require DIXF troubleshooting from FinOps point of view
and Dataverse telemetry if it fails in Dataverse side.
o Important is to collect Request Activity Id from activity tab and DWM project.
- Live sync: We’ll always collect:
o Network trace
o AX trace
o CE plugin trace (if the direction is Dataverse to FinOps)
o IsDebug mode and DualWriteErrorLog (if the direction is Finops to Dataverse)
o DualWriteProjectConfiguration, DualWriteProjectFieldConfiguration,
BusinessEventsDefinition tables exported to Excel.

2. Prerequisites
Lab prerequisites are: Dual Write installed and environments linked.

-Finance and Operations app environment with Power Platform link enabled.

-Access to a Dev Virtual machine to use Trace Parser

-HOL_Dual write installation and setup: Dual write needs to be configured and Solutions
applied in Dual write UI.

-HOL_Initial sync

-HOL_Live sync

3. Lab steps
3.1. Collect a network trace (HAR file)
For some scenarios you will have to ask the customer for a Network trace to perform
additional troubleshooting and telemetry review.
In this exercise we’ll collect a Network trace using Chrome when refreshing a table map,
however it can be collected in any browser screen. In your case, connect to Finance and
Operations > Data management workspace > Dual write > All Products
(msdyn_globalproducts) and proceed with the following steps:

1. In the opened tab, press F12 or choose Developer tools to open the developer tools.

2. Open the Network tab.

Red dot means the trace is collecting, if you click on it and changes to grey, the network will
stop collecting.

3. Run your scenario and observe the requests being logged. In our case, click on Update
tables button for the mapping

4. Right-click on the entries and select Save all as a HAR with content or click on the
arrow looking down to export.
For analysis you can import your Network trace using Import Har from same developer tools
(arrow looking up).

3.1.1. Important topics in the Network


trace for analysis
Once you have the Network trace you must analyze it. You will have listed in the left-hand side
multiple lines, each line per operation ran within the browser.

For analysis you may go one by one checking each Headers, Preview and Response tab.
You will find out x-ms-correlation-id (x-ms-correlation-id: 5b87db07-418b-4bc5-b67e-
2cfd14b3ee69) that will be the correlation id to review the Data integration telemetry (Island
cluster) in the next Hand on lab.

In some scenarios the Network trace gives us the direct error message, other times with the
correlation Id we can go and get more information from the telemetry for additional insights.

Copy your correlation Id and save it to use it later in the next Hand on lab.

3.2. Enable Plug-in trace in Dataverse


Required role to turn on the trace log and view errors: System admin

To turn on the trace log, follow these steps.

1. Sign into Dynamics 365 (Dataverse), open the Settings page, Advanced settings.

2. On the Administration page, select System Settings.


3. On the Customization tab, in the Plug-in and custom workflow activity tracing column,
select All to enable the plug-in trace log. If you want to log trace logs only when
exceptions occur, you can select Exception instead. For this Lab, please select All. Then
click ok.

As having the setting enabled Dataverse will create extra error logs in Dataverse side, we
should recommend customer to enable it, perform troubleshooting (repro the issue and traces
collection) and then disable it to avoid performance issue.

3.3. Get the Plugin trace log generated


With the Dataverse trace log enabled, once customer reproduce the issue, we’ll review the
generated Plugin trace logs. This will help us gather more information for troubleshooting,
payload generated and sent but also to identify if customer has customizations on Dataverse
side (custom plugins).

Sign into Dynamics 365 (Dataverse), open the Settings page, Advanced settings. Expand menu
> Customization > Plug-in Trace log.

The most important trace log to collect is named PreCommitLog. The interesting section to
pick for analysis is Message Block.

3.4. Enable IsDebug mode


Required role to view the errors: System admin

Dual-write errors that originate in Dataverse can appear in the Finance and Operations app. In
some cases, the full text of the error message isn't available because the message is too long
or contains personally identifying information (PII). You can turn on verbose logging for errors
by following these steps.

1. All project configurations in Finance and Operations apps have an IsDebugMode


property in the DualWriteProjectConfiguration table. Open the
DualWriteProjectConfiguration table by using the Excel add-in.
2. Set the IsDebugMode property to Yes for the project.

An easy way to open the table is to turn on Design mode in the Excel add-in and then add
DualWriteProjectConfigurationEntity to the worksheet. For more information, see Open table
data in Excel and update it by using the Excel add-in. All this extra logging will be created in
table named DualWriteErrorLog. Bear in mind that logs are created on this table in case we
have live sync interaction FinOps to Dataverse. In case the live sync is successful, you will be
able to see the payload as well generated.

Let’s enable IsDebug mode for a map. Navigate to Common > Common > Office integration >
Excel workbook designer:
Search by DualWriteProject > Select DualWriteProjectConfiguration > select all the fields and
select Create workbook.

Select download, open Excel and login in the Add-in if necessary.


Let’s enable is Debug Mode for Vendors V2 (mdsyn_vendor) – mapping that is currently
running at that moment in the environment.

Identify the two lines related to the desired mapping, scroll to the right until get IsDebugMode
column:

Switch the value to Yes and click Publish.

3.4.1. DualWriteErrorLog table


To collect the extra log created by IsDebugMode field, simply open DualWriteErrorLog table in
table browser: https://FinOpsUrl/?mi=sysTableBrowser&tableName=DualWriteErrorLog

Export the table content to Excel from Office icon:

3.5. Disable performance enhancement


Quoting our Dual write Platform Product Group on Yammer: The live sync works by capturing
the table modifications defined by the field mapping. There are some checks done on the
records to validate if the record is appropriate for outbound. When the flag
DisablePerfEnhancement is turned off, it will skip the check (if DW mapped fields for original
record are same as the new modified record in the transaction). Ideally if the flag is required to
be turned on then it means that the transaction is not modifying any mapped fields. It could be
a case that the field is not used for mapping or there could be some changes made by
doupdates or recordset operations which are not tracked by DW live sync. We see the
DisablePerfEnhancement being used in cases like virtual field tracking or a force push in cases
where the change is not on a mapped field. Its ok to make this change for an entity map but it
would be good to trace the transaction to know which exception case it falls into.
https://www.yammer.com/dynamicsaxfeedbackprograms/#/Threads/show?threadId=133600
2688278528

So for troubleshooting purpose, on live sync operations FinOps to Dataverse direction where
the data is not propagated, you can ask customer to enable “DisablePerfEnhancement”
checkbox in DualWriteProjectConfiguration table with same steps from 3.2.2 but enabling
DIsablePerfEnhancement. If the troubleshooting step does not help, ask the customer to
uncheck the value again.

Follow the same steps listed in “3.4 Enable IsDebug mode” to update DisablePerfEnhancement
checkbox value via Excel add-in for a map.

3.6. Collect an Ax trace


Ax trace is an important troubleshooting tool in Dual write scenarios as it will give us additional
insights of the logic executed in Finance and Operations during the process.

In this exercise let’s collect an Ax trace when creating a vendor for this exercise to familiarize
with the trace collection.

Connect to Finance and Operations app > Accounts payable > Vendors.

Select ? > Trace:

Give a name = HOL_VendCreation and hit Start trace.


Once the environment is ready, it is time to perform the functionality we want to track. go to
the All vendors screen and click New.

Fill in the necessary fields and then click Save.

Vendor account = HOL001

Name = HOL_Vendor001

Group = 10
Click Stop trace.

Select Download trace to get the .etl file.


3.7. Import the collected Ax trace for
analysis
To do trace analysis you need a Dev machine (VMAS, Cloud hosted) where you will find
installed Trace Parser.

Navigate to your FinOps VM, search by Trace Parser and open it.

Select Import Trace, pick your trace

Once the trace loads, you are ready to start the trace investigation. Bear in mind that you can
have multiple sessions collected due to the Ax trace will collect all the logic running in the
environment at that moment.

4. TSG and references


Here you can find out the most important links for Dual write:
Trainings delivered by Product Group per area:

Dual Write- CSS, Training Sessions - Overview (visualstudio.com)

Dual write main troubleshooting page flow:

Dual-Write Troubleshooting Guide - Overview (visualstudio.com)

Specific troubleshooting for GAB solution and known issues:

Dual write GAB and Party Troubleshooting guide - Overview (visualstudio.com)

Specific troubleshooting for SCM solution and known issues:

Dual Write- SCM TSG - Overview (visualstudio.com)

Specific troubleshooting for HCM solution and known issues:

Dual Write- SCM TSG - Overview (visualstudio.com)

Dual write releases:

DW- Releases - Overview (visualstudio.com)

Dual write contacts per area:

Dual Write- Contacts - Overview (visualstudio.com)

Dual-write solutions ICM team - Overview (visualstudio.com)

You might also like