Hi there,
I have added a button to my custom entity so that on the click of that button a dialog should be opened,
The web resource code for the button I have added below:
<html><head><meta charset="utf-8"></head><body><button onclick="openDialogProcess('%7b890D1424-7F35-49F1-9E5A-5A3180A1FA66%7d','new_nameh',objectId)" type="button" ;=""> Click Me!</button> </body></html>
I got the dialogId and entityName but the objectID depends on the record that has been selected.
and a javascript in the form properties is:
function openDialogProcess(dialogId,entityName,objectId) { var url = Xrm.Page.context.getClientUrl() + "/cs/dialog/rundialog.aspx?DialogId=" + dialogId +"&EntityName=" +entityName + "&ObjectId=" + objectId; window.open(url); }
I haven't set any event or parameters for the javascript.
the problem is when I click on the button nothing happens! and the dialog doesn't open up. any ideas?
*This post is locked for comments