Form Level Notification in Dynamic 365 CRM
Dynamics 365 provides
different ways to implement client side notifications.
Syntax to display form
level notifications is
Xrm.Page.ui.setFormNotification(message, type, unique_id);
NOTE: All three parameter are of string data type.
We get an error, when we provide unique_id as an integer.
Example - Jscript Code
function vj_show_Form_Notification()
{
Xrm.Page.ui.setFormNotification("ERROR message at Form
Level",
"ERROR", "1001");
Xrm.Page.ui.setFormNotification("WARNING message at
Form Level",
"WARNING", "1002");
Xrm.Page.ui.setFormNotification("INFO message at Form
Level",
"INFO", "1003");
}
function vj_hide_Form_Notification()
{
Xrm.Page.ui.clearFormNotification("1001");
Xrm.Page.ui.clearFormNotification("1002");
Xrm.Page.ui.clearFormNotification("1003");
}
Here is Syntax for Field Level Notifications
Xrm.Page.getControl("fieldname").setNotification("message");
Xrm.Page.getControl("fieldname").clearNotification();
Regards,
Vipin
Jaiswal
vipinjaiswal12@gmail.com
No comments:
Post a Comment