是否可以在线获取Dynamics CRM中的架构更改信息? [英] Is it possible to retrieve schema change information in Dynamics CRM online?
本文介绍了是否可以在线获取Dynamics CRM中的架构更改信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在创建自定义实体时,添加或更改了字段,有人对元数据进行了现成的更改。
When a custom entity is created, a field is added or changed, someone makes an out-of-box changes to metadata.
如何知道谁做的以及何时做的?
从UI表单创建或修改的内容相同。 CRM中的元数据似乎并不存储该信息。
The same for the creation or modification from a UI form. The metadata in CRM doesn't seem to store that information.
推荐答案
并非您所要的。但这将是实现您想要的目标的一个很好的起点。
Not exactly what you are looking for. But this will be a good starting point to achieve what you want.
使用 RetrieveMetadataChangesRequest ,我们可以获得以下架构更改:
Using RetrieveMetadataChangesRequest, we can get the schema changes like:
- 添加一个名为sample_SampleEntityForMetadataQuery的自定义实体,并带有名为$的
a自定义选项集属性:sample_ExampleOptionSet - ClientVersionStamp:296646!2012/10/22 21:42:06
- 向sample_ExampleOptionSet属性
选项添加一个附加选项 - 删除sample_SampleEntityForMetadataQuery自定义实体
- 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
-
示例代码可以在MSDN / SDK中找到。
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);
}
这篇关于是否可以在线获取Dynamics CRM中的架构更改信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文