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的更多相关文章

  1. Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值

    仅仅做下记录,因为老是用到但老是忘记 var value = new Array(); value[0] = new Object(); value[0].id = idValue; value[0] ...

  2. 转:JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013

    JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013 98 Replies Here’s a quick reference guid ...

  3. Dynamics CRM - 为 Form 或者字段设置 Error Notification

    在 Dynamics CRM 开发中,我们一般要利用 JS 来做一些数据验证的功能,我们也需要将验证结果显示出来,比起直接 alert 出信息来提示用户的方式,CRM 提供了更加美观和人性化的方式来通 ...

  4. Dynamices CRM JS 类库 神器 XrmServiceToolkit - A Microsoft Dynamics CRM 2011 & CRM 2013 JavaScript Library

    XrmServiceToolkit - A Microsoft Dynamics CRM 2011 & CRM 2013 JavaScript Library http://xrmservic ...

  5. 在Dynamics CRM中使用Bootstrap

    我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面 ...

  6. Dynamics CRM 客户端程序开发:在实体的列表界面添加按钮

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复114或者20140312可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 如果没有安装Ribbon Wor ...

  7. 为Dynamics CRM的Office附件注释定制个无需下载即可在线查看的功能

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复164或者20151021可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 上一篇博客:为Dynamics ...

  8. 为Dynamics CRM注释的图片附件做个预览功能

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复163或者20151017可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! Dynamics CRM中注释可 ...

  9. 在Dynamics CRM中自定义一个通用的查看编辑注释页面

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复162或者20151016可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 注释在CRM中的显示是比较特别, ...

随机推荐

  1. Source Insight 常用设置和快捷键大全

    Source Insight 常用设置和快捷键大全 退出程序 : Alt+F4 重画屏幕 : Ctrl+Alt+Space 完成语法 : Ctrl+E 复制一行 : Ctrl+K 恰好复制该位置右边的 ...

  2. EM界面 ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的 SID (DBD ERROR: OCIServerAttach)

    我的是10g,打开EM,另外都正常,就有这个问题到实例的代理连接 状态 失败 详细资料 ORA-12505: TNS: 监听程序当前无法识别连接描述符中所给出的 SID (DBD ERROR: OCI ...

  3. Python 3.5 RuntimeError: can't start new thread

    /*********************************************************************** * Python 3.5 RuntimeError: ...

  4. Java用户线程和守护线程

    今天看Java一个关于多线程返回值方式的示例,发现一个自己不太能理解的问题,就是在主线程中启动了几个工作线程,主线程中也没有join,工作线程居然也是正常输出了回调的结果.这个跟linux C++下的 ...

  5. 【转】 TechED2010与我(三) —— 初识云计算

    作者用到的比喻很好. 网址:TechED2010与我(三) -- 初识云计算 初识云计算最近"云计算"被炒的很热,但是由于工作重点主要是做WinForm的控件开发,对云计算的接触比 ...

  6. RealProxy实现AOP编程(1)

    Program.cs class Program { static void Main(string[] args) { User user = " }; var processor = T ...

  7. CvMat结构

    一.创建矩阵的方式: 1.cvCreateMat(int rows,int cols,int type),Type可以使任何预定义类型.Type的写法规则:CV_<bit_depth>(S ...

  8. apk下载解决微信扫一扫问题

    .btn{display: block;width:100%;padding:10px;border:none;cursor: pointer;outline: none;} .btn-primary ...

  9. ubuntu安装opencv

    ubuntu版本是12.04 ,opencv的版本是2.4.9 其实官网有教程的,http://docs.opencv.org/doc/tutorials/introduction/linux_ins ...

  10. Hbase的flush机制

    Hbase Flush机制最小Flush单元为HRegion,尽量减少CF数量以减少HStrore数量从而减少MemStore的数量,最终减少每次Flush的开销.1.Region级别触发条件:   ...