[英]Dynamics CRM 2013: Audit logs have “blank” records
為什么給我這些
因為這些字段正在更新。 如您所述,這很可能是由插件或工作流程引起的。
插件在忘記實例化新Entity
並僅賦予其必要屬性以進行更新時,常常會錯誤地更新字段:
實例化一個新實體
var smallEntity = new Entity { Id = new Guid("entityId"), LogicalName = "entityName" };
smallEntity["firstname"] = "newName";
...
service.Update(smallEntity);
不必要地更新所有字段
var bigEntity = service.Retrieve(new Guid("entityId"), "entityName", new ColumnSet(true));
bigEntity["firstname"] = "newName";
...
service.Update(bigEntity);
smallEntity
僅包含一個屬性。 調用Update
,審核歷史記錄將僅顯示一個字段為已更新。
bigEntity
包含每個單獨的實體屬性,因為它是使用new ColumnSet(true)
檢索的。 調用Update
,即使實際上只有"firstname"
已更改,審核歷史記錄也會將所有字段顯示為已更新。
我如何使其停止?
一種選擇是過濾審核歷史記錄視圖以僅顯示您感興趣的字段:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.