Recently, Microsoft introduced truncate entity list in Dynamics 365 F&O. With this option, user can truncate all entities in Dynamics 365 F&O without writing any SQL script or x++ code.
What is truncate entity list
Sometimes, while doing deployment or development we get an issue with the entity, and we need to delete the entity from the Data management or SQL database. With this option, it will delete all entities from the system. Once this operation is completed then we need to refresh entity list to load all entities in the system.
You must need at least 10.0.28 version installed in the system
Step 1: First go to Data management > Framework parameters
Step 2: Go to Entity settings and click on Truncate entity list
Once you clicked on truncate entity list then wait for a while
Once the operation is completed then you will see all entities are deleted from the Data entities.
Step 3: Click on refresh entity. This will refresh all entities in the system.
Note: This will take some time to load all entities.
Once the entities are refreshed, you can see all entities are loaded in the system.
Now, you can perform your Data management related activity.
If you dont have this version, then you can truncate entity list via X++ job or SQL query.
You need to truncate 4 tables.
truncate table DMFEntity truncate table DMFTargetXML truncate table DMFTargetXMLToEntityMap truncate table DMFTargetEntityHierarchy
If you like this article, feel free to share it with others who might find it helpful! If you have any questions, feel free to reach out to me.