如何编辑首选联系方式字段中显示的选择字段
How to edit the selection fields that are shown in the preferred method of contact field
我想从联系人选择器的首选方法中删除 fax
选项。当前显示 Any
Email
Phone
Fax
和 Mail
的选项(下面包含图像),我想从中删除 Fax
列表。我目前正在使用
var preferredContactMethodCode = Xrm.Page.getAttribute('preferredcontactmethodcode').getValue();
访问这些值,但我不知道如何编辑这些值。如果您能找到有关该主题的任何文档,我们将不胜感激。
该字段是一个选项集。只要您具有系统定制员或系统管理员安全角色,就可以使用设置区域的自定义部分编辑该字段。
有关更多信息,您可以在此处查看:
https://www.microsoft.com/en-US/dynamics/crm-customer-center/create-or-edit-entity-fields.aspx
对于选项集特定的编辑,此文档可用:
https://technet.microsoft.com/library/dn531201.aspx
在运行时使用RemoveOption删除选项集选项。
Xrm.Page.getControl('preferredcontactmethodcode').removeOption(4); //4-Fax
要完全删除选项集(我绝不会建议在开箱即用的字段上这样做),自定义选项集(CRM 自定义、字段自定义)和 remove/delete 选项集选项(您将丢失数据)。
我想从联系人选择器的首选方法中删除 fax
选项。当前显示 Any
Email
Phone
Fax
和 Mail
的选项(下面包含图像),我想从中删除 Fax
列表。我目前正在使用
var preferredContactMethodCode = Xrm.Page.getAttribute('preferredcontactmethodcode').getValue();
访问这些值,但我不知道如何编辑这些值。如果您能找到有关该主题的任何文档,我们将不胜感激。
该字段是一个选项集。只要您具有系统定制员或系统管理员安全角色,就可以使用设置区域的自定义部分编辑该字段。
有关更多信息,您可以在此处查看: https://www.microsoft.com/en-US/dynamics/crm-customer-center/create-or-edit-entity-fields.aspx
对于选项集特定的编辑,此文档可用: https://technet.microsoft.com/library/dn531201.aspx
在运行时使用RemoveOption删除选项集选项。
Xrm.Page.getControl('preferredcontactmethodcode').removeOption(4); //4-Fax
要完全删除选项集(我绝不会建议在开箱即用的字段上这样做),自定义选项集(CRM 自定义、字段自定义)和 remove/delete 选项集选项(您将丢失数据)。