Friday, November 22, 2019

Entity isn't enabled for change tracking.


I got this error when I was trying to delete a record and there was a flow registered on Delete of a record.

Flow operation was requesting entity tracking data and entity was not configured for change tracking, so we need to enable change tracking for an entity.

1. Navigate to Settings> CustomizationsCustomize the System and select the entity for which you want to track changes.
2. On the entity’s General tab, scroll down to Data Services, and select the Change Tracking option box.


There is no plugin in XrmToolBox yet to update change tracking for all entities, so here is C# code.

UpdateEntityRequest updateCustomEntityRequest = new UpdateEntityRequest
{
     Entity = myCustomEntity,
     ChangeTrackingEnabled = true //or false here
};
_serviceProxy.Execute(updateCustomEntityRequest);

1 comment:

Unknown said...

Thank You! It worked.