Since upgrading to Dynamics CRM 2016 I have made great use of only adding the entity components required to solutions rather than the entire entity itself.  The key reason why you would want to do this is to ensure that no unintended changes are made in the target system.

Recently upon importing an unmanaged solution it was noted that entity audit for one of the entities contained in the solution was temporarily disabled and re-enabled at the time of import.  I’ve seen this happen with managed solutions before but never unmanaged ones.  This shouldn’t be much of an issue but a known bug in CRM means that despite the audit logs remaining present all historic changes are lost, rendering the audit log completely useless.  A post about this may be found here.

Upon further investigation as to how this happened, and with a bit of trial and error, it would appear that this issue is caused by not including entity metadata in the solution.


One imagines that this is a bug that will be fixed at some point but in the meantime it’s probably worth including it in to avoid losing your audit history.  For more information about what is contained in the entity metadata, please visit Ben Hosking’s blog on it here.