转 Dynamics CRM Alert and Notification JavaScript Methods
Posted BinBinGo
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了转 Dynamics CRM Alert and Notification JavaScript Methods相关的知识,希望对你有一定的参考价值。
http://www.powerobjects.com/2015/09/23/dynamics-crm-alert-and-notification-javascript-methods/
Before CRM 2013, if you wanted to alert a user on a form within the browser, the only method available was the standard JavaScript alert. This method would open an alert window over the record the user is viewing, which then must be acknowledged in order for the user to continue.
The code,
alert("This is a standard alert")
produces the pop up window as illustrated below.
With CRM 2013, Microsoft introduced an additional alert method that is specific to CRM, Xrm.Page.ui.setFormNotification. This newer method allows you to specify three different types of alerts: error, information, and warning. Furthermore, instead of popping a window open over the current window, setFormNotification embeds the notification in the CRM page itself. These codes:
Xrm.Page.ui.setFormNotification("This is an INFORMATION notification.", "INFORMATION") Xrm.Page.ui.setFormNotification("This is a WARNING notification. ", "WARNING") Xrm.Page.ui.setFormNotification("This is an ERROR notification. ", "EROR")
produce the notifications in the screenshot below that are visible just under the Account record title.
The code
Xrm.Page.ui.clearFormNotification()
can be used to clear these notifications.
Additionally, you can call out specific fields with the setNotification method. The code
Xrm.Page.getControl("fax").setNotification("This is a notification about the Fax field")
produces the notification attached to the fax field on the Account record shown below.
With these different methods, you can now carefully choose how overt or subtle you would like to be in calling out important information on a record to users.
Want to stay up to date with our blog? Subscribe today!
Happy CRM’ing!
以上是关于转 Dynamics CRM Alert and Notification JavaScript Methods的主要内容,如果未能解决你的问题,请参考以下文章
Grid (read-only) objects and methods (client-side reference)获取子表单对象的一些方法 Crm 2016
Dynamics CRM - 在 Dynamics CRM 开发中创建一个 Entity 对象
从 Microsoft Dynamics CRM 4.0 server迁移到 Microsoft Dynamics CRM 2013 Server
关于MS Dynamics AX 和 MS Dynamics CRM实施