Dual Write - 004 - Alerts
Dual Write - 004 - Alerts
Contents
1. Overview................................................................................................................................ 2
2. Prerequisites .......................................................................................................................... 2
3. Lab steps ................................................................................................................................ 3
3.1. Create an alert ............................................................................................................... 3
3.2. Test your alert ............................................................................................................... 6
3.3. Restore your mapping status ......................................................................................... 9
3.4. Disable an alert ........................................................................................................... 10
3.5. Delete an existing alert ................................................................................................ 12
1. Overview
This HOL has been created to show the alert capability existing on Dual write.
Microsoft has invested lots of time and effort into making dual-write resilient to errors.
As an admin, you can create one or more alert settings to handle cases of planned or
unplanned maintenance. For example, you can set up the dual-write system to notify you by
email if a specific error threshold is reached because of, for example, network errors. The dual-
write system can also take action on your behalf. For example, it can pause or stop dual-write.
This feature is especially useful if there is unplanned maintenance. For example, one of the
apps becomes unavailable and, based on your defined thresholds, dual-write goes into a
paused state where all new requests are queued (that is, they aren't lost). After you fix the
underlying issue, and both apps are running smoothly, you can resume from the paused state.
The updates will then be read back from the queue and written to the recovered app.
Error management and alert notifications - Error management and alert notifications - Finance
& Operations | Dynamics 365 | Microsoft Learn
Bear in mind that once you have setup an alert, you need to restart your running mappings in
order to take effect.
401 Unauthorized: Required AAD app users are missing from either Dataverse or Finance and
Operations side
403 Forbidden: Permissions issue (Finance and Operations apps AAD client ID missing, user
disabled, missing roles)
502 Bad Gateway: Target app is unexpectedly not ready to handle the request
429 Too Many Request: Client application makes extraordinarily demanding requests.
2. Prerequisites
Lab prerequisites are:
-Finance and Operations app environment with Power Platform link enabled.
-HOL_XXX_Dual write installation and setup: Dual write needs to be configured and Solutions
applied in Dual write UI.
3. Lab steps
3.1. Create an alert
Connect to Finance and Operations App and select Data Management workspace > Dual write
tile.
Scroll down to see the bottom part of the form and add:
Send notification emails to: your email address for this HOL purpose, however you can also
select whether notifications should be sent to an individual or a group, and whether the dual-
write system should take any action on your behalf. To send alerts to a group, enter the values
separated by commas, for example, "[email protected], [email protected]".
This means that we are setting up an alert that will be executed if during a period of 5 minutes
we have 3 application error in Dataverse or FinOps side, for example a data validation issue,
that particular mapping will be paused.
Clive Save.
The new alert appears listed in the summary form. Then click on Close.
In order for your alerts to take effect, you need to restart your table maps. So Select following
mappings, stopped them and once stopped, run them skipping initial sync.
Go to account and locate an existing customer that exists in both environments, for example
US-001.
Go back to Dataverse and Open US-001, select Addresses tab, where you can see that the
same customer address that exists in FinOps exists in Dataverse.
As country/region as per design in Dataverse does not have lookup field, then is quite easy to
force the validation data issue adding a country that does not exists in Finance and Operations.
Then click Save and close the pop-up validation. Do the same process 4- 5 times.
Unable to write to Finance and Operations apps due to following error(s): {"Write failed for
entity CDS postal address history V2 with unknown exception - Mandatory field
'LogisticsPostalAddress.CountryRegionId' not set\nvalidateWrite failed on data source
'LogisticsPostalAddressBaseEntity (LogisticsPostalAddressBaseEntity)'"} Please rectify your data
and try again. If issue persists after multiple retries, please contact your system administrator.
Navigate to Dual write UI, and filter by Paused, as it is the action setup if the alert triggers.
Open the mapping and go to queued records, and confirm if you have records there.
If you have records this means that you have kick off the validation issue more than 3 times
(setup for the alert to trigger and pause the map). As the map switched to pause state, the rest
of the changes are tracked in queue.
3.2. Restore your mapping status
If an alert changed the status of your map to Paused or stopped, there is no automatic action
to make it running again, this needs manual intervention. So navigate to your paused maps,
select CDS postal address locations map and click Run.
Click the bin icon corresponding to the alert you want to delete