1

I am encountering a problem with the Two Options fields, having the Auditing option enabled in CRM 2011.

Since the CRM Two Options fields have a default value No/Yes by default, related audit records are always created for these fields on entity Create, when Auditing is enabled.

These field audits that include the default Boolean value (false/true), are in fact useless for the user, seeing that this initial unchanged value should be considered as Null. So, the audits should not be created and shown to the user in this case, especially when there are numerous Boolean fields and very frequent Create operations on the entity.

I could set the default value of the Two Options field twoOptionsField to null instead of false or true, by doing this on the form Load:

var twoOptionsField = Xrm.Page.getAttribute("twoOptionsField");
twoOptionsField.setValue(null); // set the value to null
twoOptionsField.setSubmitMode("always"); // store the null value

But this will automatically add the field audit with an empty value on Create.

Is there any efficient way we could avoid the audit records for initial "null"/default valued Two Options fields, having Auditing enabled, on entity Create?

4

1 回答 1

1

我不知道任何设置来设置它。您可以采用的一种策略是在实体的预创建\更新中检查该字段的值,如果为空,则禁用该字段的审计功能,如果不为空,则启用审计。审计可以应用于组织\实体和属性。我不尝试这只是一个想法:D

于 2013-02-26T09:27:47.737 回答