mrrodd
mrrodd

Reputation: 126

Is it possible to retrieve schema change information in Dynamics CRM online?

When a custom entity is created, a field is added or changed, someone makes an out-of-box changes to metadata.

How to know who did it and when?

The same for the creation or modification from a UI form. The metadata in CRM doesn't seem to store that information.

Upvotes: 3

Views: 346

Answers (2)

Not exactly what you are looking for. But this will be a good starting point to achieve what you want.

Using RetrieveMetadataChangesRequest, we can get the schema changes like:

  • Adding a custom entity named sample_SampleEntityForMetadataQuery with a custom optionset attribute named : sample_ExampleOptionSet
  • ClientVersionStamp: 296646!10/22/2012 21:42:06
  • Adding an additional option to the sample_ExampleOptionSet attribute options
  • Deleting the sample_SampleEntityForMetadataQuery custom entity

--

Sample code can be found in MSDN/SDK.

 protected RetrieveMetadataChangesResponse getMetadataChanges(
                         EntityQueryExpression entityQueryExpression,
                         String clientVersionStamp,
                         DeletedMetadataFilters deletedMetadataFilter)
{
 RetrieveMetadataChangesRequest retrieveMetadataChangesRequest = new RetrieveMetadataChangesRequest()
 {
  Query = entityQueryExpression,
  ClientVersionStamp = clientVersionStamp,
  DeletedMetadataFilters = deletedMetadataFilter
 };

 return (RetrieveMetadataChangesResponse)_service.Execute(retrieveMetadataChangesRequest);

}

Upvotes: 1

Piotr Gaszewski
Piotr Gaszewski

Reputation: 343

I think it is not possible to access information you're asking for. Such a information is not available in the on-premise CRM database and I suppose there is a similar situation with CRM Online

Upvotes: 1

Related Questions