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. Windows下VTK6.0.0安装详解(CMake使用说明)

    操作系统:Windows7,用到工具:Visual studio.CMake. 1.准备工作 VTK下载: 下载最新VTK稳定版(6.0.0,截至2013年7月)http://www.vtk.org/ ...

  2. mysql max_allowed_packet

    系统linux > show global max_allowed_packet; >set global max_allowed_packet=1024*1024: 退出mysql,重启 ...

  3. MySQL数据库之------DOS命令行的基本操作

    1.   进入D盘的如下路径: 按住   ctrl+shift  ,右键,选择在此处打开命令行窗口.出现图2.   图   1  图 2 2. .     3.   图 3  4.    图 4   ...

  4. MySql和Oracle的日期转换到底有哪些不同?我们来比较一下

    1.MySql和Oracle的日期转换 mysql中有2种日期格式DATE和TIME,oracle只有一种日期格式DATE. oracle> select to_char(sysdate,'yy ...

  5. ”未在本地计算机上注册“microsoft.et.OLEDB.4.0”提供程序。“解决方案大集合

    本人在做一个连接Access数据库的时候,程序扔给我一个如此Bug——“未在本地计算机上注册“microsoft.et.OLEDB.4.0”, 请教度娘,告诉我可能是如下因素: 一.“设置应用程序池默 ...

  6. Pocscan搭建详解

    0x01 关于Pocscan Pocscan是一款开源 Poc 调用框架,可轻松调用Pocsuite,Tangscan,Beebeeto,Knowsec老版本POC 按照官方规范编写的 Poc对目标域 ...

  7. iOS分析UI利器——Reveal及简单破解方法

    Reveal作为分析APP UI的利器确实非常好用,用来查看任意UI布局也很方便 一.模拟器进行分析 1.打开Reveal(http://revealapp.com下载) 2.打开Xcode 3.Re ...

  8. Codeforces Round #172 (Div. 2)

    A. Word Capitalization 模拟. B. Nearest Fraction 枚举. C. Rectangle Puzzle 求出两个矩形的点,套简单多边形的面积交板子. D. Max ...

  9. 新浪ip地址转换接口

    通过IP地址获取对应的地区信息通常有两种方法:1)自己写程序,解析IP对应的地区信息,需要数据库.2)根据第三方提供的API查询获取地区信息. 第一种方法,参见文本<通过纯真IP数据库获取IP地 ...

  10. LEETCODE —— Unique Paths II [动态规划 Dynamic Programming]

    唯一路径问题II Unique Paths II Follow up for "Unique Paths": Now consider if some obstacles are ...