Filter intercompany orders to avoid syncing Orders and OrderLines
You can filter intercompany orders so that the Orders and OrderLines tables aren't synced. In some scenarios, the intercompany order details aren't required in a customer engagement app.
Each standard Dataverse table is extended through references to the IntercompanyOrder column, and the dual-write maps are modified so that they refer to the additional columns in the filters. Therefore, the intercompany orders are no longer synced. This process helps prevent unnecessary data in the customer engagement app.
Extend the CDS Sales Order Headers table by adding a reference to the IntercompanyOrder column. This column is filled in only on intercompany orders. The IntercompanyOrder column is available in the SalesTable table.
After CDS Sales Order Headers is extended, the IntercompanyOrder column is available in the mapping. Apply a filter that has
INTERCOMPANYORDER == ""
as the query string.Extend the CDS Sales Order Lines table by adding a reference to the IntercompanyInventTransId column. This column is filled in only on intercompany orders. The InterCompanyInventTransId column is available in the SalesLine table.
After CDS Sales Order Lines is extended, the IntercompanyInventTransId column is available in the mapping. Apply a filter that has
INTERCOMPANYINVENTTRANSID == ""
as the query string.Repeat steps 1 and 2 to extend the Sales Invoice Header V2 table and add a filter query. In this case, use
(INTERCOMPANYORDER == "") && (SALESORDERNUMBER != "")
as the query string for the filter.Repeat steps 3 and 4 to extend the Sales Invoice Lines V2 table and add a filter query. In this case, use
INTERCOMPANYINVENTTRANSID == ""
as the query string for the filter.The Quotations table doesn't have an intercompany relationship. If someone creates a quotation for one of your intercompany customers, you can use the CustGroup column to put all those customers into one customer group. You can extend the header and lines by adding the CustGroup column, and then filter so that the group isn't included.
After Quotations is extended, apply a filter that has
CUSTGROUP != "<company>"
as the query string.