Description:
In this example we explain that how to use
alertDialog and confirmDialog to display messages to users In dynamic crm. Or how
to display alert box or alert dialog box in CRM for tablets because simply
javascript alert is not display for CRM tablets.so to display alert dialog or
confirm dialog box or any messages to user in CRM tablets user you must have to
use XRM alert dialog facility provided by XRM utility.
Below is the syntax for the alert and confirm dialog
boxes in CRM for tablets.
Xrm.Utility.alertDialog(message, onCloseCallback)
Xrm.Utility.confirmDialog(message, yesCloseCallback,
noCloseCallback)
The following is the example that will prompt the
user and set the description field of the CRM form like below
Example:
FormOnLoad = function () {
var
description = null;
Xrm.Utility.confirmDialog("Set
meaningless description?",
function () {
description = "Meaningless description";
},
function () { }
);
Xrm.Utility.alertDialog(
"Your wish is my command",
function () {
if
(description) {
Xrm.Page.getAttribute("description")
.setValue(description);
}
}
);
}
0 comments:
Post a Comment