Hi, is it possible to have a dialog before creating a case , I want to guide the users. And the new case should have the info from the dialog. how should I implement that?
*This post is locked for comments
Hi, is it possible to have a dialog before creating a case , I want to guide the users. And the new case should have the info from the dialog. how should I implement that?
*This post is locked for comments
You can create an HTML Web Resource, and before the record is saved (either capture the save event or use a custom button), show the page that you created and when the user press OK on the form, return the values from the web resource that you created.
You can do this by using the Xrm.Internal.openDialog, but it is unsupported and you never know when Microsoft will change something. Or you can use you own windows.open functionality and attach a handler for a callback function.
To use the Xrm.Internal.openDialog, you can follow the following code:
function openWindow() {
var DialogOption = new Xrm.DialogOptions;
DialogOption.width = 600; DialogOption.height = 450;
Xrm.Internal.openDialog("/WebResources/new_mydialog.html", DialogOption, null, null, windowUpdateCallback);
}
function windowUpdateCallback(callback) {
// You can call a split on your callback here if you need to capture multiple values from your form.
}
Inside you HTML Web Resource, add the following code when the user click the OK/Apply button:
Mscrm.Utilities.setReturnValue(myReturnValue);
closeWindow(true);
Hope this helps.
Dialogs are getting deprecated in the next release (they are not, necessarily, disappearing right away, but still).
That said, you would likely have to just start the dialog (using a custom ribbon button, for example), collect user's input, and create a case just like you would do in a workflow
André Arnaud de Cal...
292,494
Super User 2025 Season 1
Martin Dráb
231,307
Most Valuable Professional
nmaenpaa
101,156