1- Find the ID of Dialog by Opening the Dialog and press F11 to get the URL. In the URL we could find out the ID of the Dialog.
http://server:5555/Org/sfa/workflow/edit.aspx?id=%7b91871DE4-8D25-4E3C-8772-2FE8605A5637%7d
2- write the following script to open Dialog:
function OpenDialog()
{
var dialogId = "%7b91871DE4-8D25-4E3C-8772-2FE8605A5637%7d";
var returnValue = showModalDialog("/" + Xrm.Page.context.getOrgUniqueName() + "/cs/dialog/rundialog.aspx?DialogId=" + dialogId + "&EntityName=lead&ObjectId=" + Xrm.Page.data.entity.getId());
//Optional:To save and close entity form as soon as the dialog is closed.
Xrm.Page.data.entity.save("saveandclose");
}
ليست هناك تعليقات:
إرسال تعليق