Is it possible to track changes to Entity Metadata in Dynamics CRM? -


is there way track changes metadata, new fields, new entities , on?

it difficult control large project in same environment, there customization should not deployed productions (mostly mistakes or test in development environment).

and there way know did customization?

i looking know every possible change, not in particular.

you have use retrievemetadatachangesrequest , not possible know made change.

this available microsoft dynamics crm 2011 update rollup 12

this request intended used cache information metadata , be able work offline, can use track changes metadata in complex projects , complex teams

examples on internet not friendly how can use request:

the request can completed filling 1 parameter

retrievemetadatachangesrequest req = new retrievemetadatachangesrequest() {     clientversionstamp = null }; var response = (retrievemetadatachangesresponse)service.execute(req); 

the first time executed request clientversionstamp needs null, because there no request made metadata before , there no clientversionstamp. parameter last time query metadata changes , if null bring customization time, request won't complete on time need tune up.

var entityfilter = new metadatafilterexpression(logicaloperator.and); entityfilter.conditions.add(new metadataconditionexpression("schemaname", metadataconditionoperator.equals, "serviceappointment")); var entityqueryexpression = new entityqueryexpression()         {             criteria = entityfilter         }; retrievemetadatachangesrequest req = new retrievemetadatachangesrequest()         {             query = entityqueryexpression,             clientversionstamp = null         }; var response = (retrievemetadatachangesresponse)service.execute(req); 

this query metadata changes "serviceappointment", feel free use entity want, need servertimestamp response, looks "22319800!09/13/2017 16:17:46", if try send time stamp first, throw exception, necessary query first server time stamp.

now can use request , time stamp retrieve new changes since "22319800!09/13/2017 16:17:46"

retrievemetadatachangesrequest req = new retrievemetadatachangesrequest()         {           query = entityqueryexpression,           clientversionstamp = @"22319800!09/13/2017 16:17:46"         };  var response = (retrievemetadatachangesresponse)service.execute(req); 

you can filter query match needs, search specific entities, labels, relationship, keys , attributes or specific properties.

entityqueryexpression entityqueryexpression = new entityqueryexpression() {     criteria = entityfilter,     properties = entityproperties,     relationshipquery = new relationshipqueryexpression()     {         properties = relationshipproperties,         criteria = relationshipfilter     },     attributequery = new attributequeryexpression()     {         properties = attributeproperties,         criteria = attributefilter     } }; 

use request , implement way need.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -