Turn Dynamics CRM Alert and Notification JavaScript Methods

Source: Internet
Author: User

http://www.powerobjects.com/2015/09/23/dynamics-crm-alert-and-notification-javascript-methods/

Before CRM, if you wanted to alert a user on a form within the browser, the only method available is the standard Ja Vascript alert. This method would open a alert window over the record the user was viewing, which then must be acknowledged in order for T He user to continue.

The Code,

Alert ("This was a standard alert")



Produces the pop up window as illustrated below.

With CRM, Microsoft introduced a additional alert method that's specific to CRM, Xrm.Page.ui.setFormNotification. This newer method allows your 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 was an information notification.", "Information") Xrm.Page.ui.setFormNotification ("This is a WARNING notification. "," WARNING ") Xrm.Page.ui.setFormNotification (" This was an ERROR notification. "," Eror ")

Produce the notifications in the screenshot below that is visible just under the Account record title.

The Code

Xrm.Page.ui.clearFormNotification ()



Can is used to clear these notifications.

Additionally, you can call out specific fields with the Setnotification method. The Code

Xrm.Page.getControl ("Fax"). Setnotification ("This was a notification about the fax field")

Produces the notification attached to the Fax field on the account record shown below.

With these different methods, what can now carefully choose what overt or subtle you would like to is in calling out Importa NT information on a record to users.

Want to stay-to-date with our blog? Subscribe today!

Happy CRM ' ing!

Turn Dynamics CRM Alert and Notification JavaScript Methods

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.