When designing data entities that will be synchronized between the CDS and Dynamics 365 Finance and Supply Chain Management (SCM), there are certain best practices you should follow to ensure the integrity of your data.
The Common Data Service (CDS) enables a smooth data flow within Microsoft Dynamics 365. This eliminates the need for manually moving your data or leaning on the capabilities of a third-party tool. When designing data entities that will be synchronized between the CDS and Dynamics 365 Finance and Supply Chain Management (SCM), there are certain best practices you should follow to ensure the integrity of your data. I’ve outlined five of them below to get you started.
- Foreign Keys: CDS entities have fields that store a lookup to other related entities. Data integration supports reading field values from a directly related entity but can’t go through more than one hop.
Do: Ensure all target fields are available in the source entity or directly related entities.
Don’t: Create source entities that are structurally different from target entities (applies to both CDS and D365 Finance).
- Consider Integration Keys: Integration keys are unique identifiers that have a common value across two or more systems. CDS uses alternate keys to enable common references with D365 Finance.
Do: Ensure indexes are defined for integration keys in Finance.
Don’t: Copy data to target system without holding the integration key in the source system. You won’t be able to perform updates.
- Autonumber: Use Autonumber (CDS) or Number Sequence (D365 Finance) to generate unique IDs for integration keys. In a multi-master scenario, ensure they can’t overlap.
Do: Use autonumbering for generating integration keys.
Don’t: Use random values, free text fields, or numbers that might overlap.
- Clear Selection Criteria: It’s common that only a subset of data needs to be kept in sync – e.g., only accounts that have an occupancy agreement. A data integration project needs a simple way of selecting source data.
Do: Use a field value (e.g., AccountType) to enable easy selection and filtering.
Don’t: Rely on complex logic (e.g., joining multiple tables) to determine which rows need to be synced.
- Mandatory Fields: Data entities in both CDS and D365 Finance have some (generally 1-5) mandatory fields that must be set for a record to be created. Source entities must have enough information to set all mandatory fields in the target entity.
Do: Clearly identify mandatory fields on both sides and ensure there is a way to set them.
Don’t: Default mandatory fields unless they really don’t exist in the source system.
This is just a start. There are plenty of additional best practices. When undertaking a project with lots of Dynamics 365 data syncing, it’s a good idea to work with a trusted Microsoft Partner like PowerObjects. We’re here to help.