- Added a custom table (DemoSalesTable) in the data source of the entity (Table relation is SalesTable.RecId = DemoSalesTable.SalesTable).
- Added fields in the entity & staging table from custom table.
- The custom table has fields exposed on Sales order details form.
- The mapping of these fields is defined in the data entity fields mapping.
- The mapping of these fields is defined in the Dual write table fields mapping.
- When standard fields of SalesTable are modified, DualWrite is syncing both standard and custom fields in the Dataverse
- But when custom fields from DemoSalesTable are modified, it is not syncing the sales order in the Dataverse for custom fields.
- I have overridden DefaultCTQuery method of SalesOrderHeaderD365SalesEntity in CoC to include DemoSalesTable in its query.
- Enabled the custom query change tracking option from data entities list page for SalesOrderHeaderD365SalesEntity.
- Manually added a record in BusinessEventsDefinition table for DemoSalesTable & SalesOrderHeaderD365SalesEntity. I am not sure which process is adding records for business event so added record manually.
- Stop, Run, Pause DualWrite service for SalesOrderHeaderD365SalesEntity.
- Refresh data entities list.
- Also tried to use SalesOrderHeaderCDSEntity which is using SalesOrderHeaderV2Entity as a data source. I have modified SalesOrderHeaderV2Entity following the similar steps as described above.