简体   繁体   English

Dynamics CRM已读/未读表单

[英]Dynamics CRM Read/Unread Form

I'm looking to have a field populate with a special characters that marks it as read when a form is looked at in CRM. 我正在寻找一个填充有特殊字符的字段,以在CRM中查看表单时将其标记为已读。 Is there a way to do this through a workflow? 有没有办法通过工作流程来做到这一点? I'm not too proficient at JavaScript but if there's a way to mark a field as yes (in a two option set) when the form is loaded that would do the trick. 我不太精通JavaScript,但是如果有一种方法可以在加载表单时将字段标记为yes(在两个选项集中),那么就可以解决问题。 Then I can use a workflow to do the rest. 然后,我可以使用工作流程来完成其余的工作。

Use this below snippet in form onload, this will check & set true in two options field for the first time. 在表单加载时使用以下代码段,这将是第一次在两个选项字段中检查并设置为true

if(Xrm.Page.getAttribute("new_yourfield") != null && Xrm.Page.getAttribute("new_yourfield").getValue() == false){
    Xrm.Page.getAttribute("new_yourfield").setValue(true);
    Xrm.Page.data.entity.save();
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM