转 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的更多相关文章
- Dynamics CRM 2011/2013 通过Javascript给lookup字段赋值
仅仅做下记录,因为老是用到但老是忘记 var value = new Array(); value[0] = new Object(); value[0].id = idValue; value[0] ...
- 转:JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013
JavaScript Reference for Microsoft Dynamics CRM 2011 / 2013 98 Replies Here’s a quick reference guid ...
- Dynamics CRM - 为 Form 或者字段设置 Error Notification
在 Dynamics CRM 开发中,我们一般要利用 JS 来做一些数据验证的功能,我们也需要将验证结果显示出来,比起直接 alert 出信息来提示用户的方式,CRM 提供了更加美观和人性化的方式来通 ...
- 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 ...
- 在Dynamics CRM中使用Bootstrap
我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面 ...
- Dynamics CRM 客户端程序开发:在实体的列表界面添加按钮
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复114或者20140312可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 如果没有安装Ribbon Wor ...
- 为Dynamics CRM的Office附件注释定制个无需下载即可在线查看的功能
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复164或者20151021可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 上一篇博客:为Dynamics ...
- 为Dynamics CRM注释的图片附件做个预览功能
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复163或者20151017可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! Dynamics CRM中注释可 ...
- 在Dynamics CRM中自定义一个通用的查看编辑注释页面
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复162或者20151016可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 注释在CRM中的显示是比较特别, ...
随机推荐
- asp.net MVC控制器中返回JSON格式的数据时提示下载
Asp.net mvc在接收的是JSON格式的数据,但是奇怪的是在IE中提示下载文件,其他浏览器中一切正常,下载后,里面的内容就是在控制器中返回的数据.代码如下: 视图中js代码: $("# ...
- REDIS fdatasync技术问题和BIO技术的引入
http://oldblog.antirez.com/post/fsync-different-thread-useless.html 这是原文作者的博客 把他翻译下 带上自己的一些理解 看看作者引入 ...
- 动态规划VS分治策略
•在用分治法解决问题时,由于子问题的数目往往是问题规模的指数函数,因此对时间的消耗太大. •动态规划的思想在于,如果各个子问题不是独立的,不同的子问题的个数只是多项式量级,而我们能够保存已经解决的子问 ...
- 神奇的sort()函数
今天来谈一谈sort()函数,sort() 方法用于对数组的元素进行排序,用法为arrayObject.sort(sortby):括号中的为可选参数,准确来说应该是一个函数,这个函数用来规定排序方法, ...
- c语言数据结构之 快速排序
编译器:VS2013 #include "stdafx.h"#include<stdlib.h> //函数声明 void QuickSort(int a[],int n ...
- android 获取包信息
private static int testPackageInfo(Context context){ int localVersionCode = 9999; try { PackageInfo ...
- Maven安装使用
环境:Ubuntu 12.04LTS,jdk1.6 1.下载maven3.05: 2.解压并获取M2/bin/mvn地址: 3.创建~/.mavenrc文件,并加入JAVA_HOME并export(需 ...
- 《java编程思想》读书笔记(二)第五章(2)
成员初始化 Java尽力保证:所有变量在使用前都能得到恰当的初始化. 对于方法的局部变量,Java会以编译时报错的形式贯彻这种保证,比如: void f() { int i; //这里编译时就会报错, ...
- CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH
CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH 因为是centos linux,默认可以采用yum方 ...
- C-随笔
C语言的设计哲学之一: 程序员知道自己在干什么-没有安全带! 值的类型并不是值的内在本质, 而是取决于它被使用的方式 1.#include <stdio.h>在预处理器处理的时候把stdi ...