locked
Open a dialog using ribbon button RRS feed

  • Question

  • HI,

    Iam trying to open a dialog on click of ribbon button on contact form.. it is getng opened but closes immediately...

    code iam using is 

    function dialog()
    {
    var dialogId = "6D4202FD-19FD-4C8A-A1AF-FE33214ED708"
    var returnValue = window.open("/cs/dialog/rundialog.aspx?DialogId=%7b" + dialogId + "%7d&EntityName=contact&ObjectId=" + Xrm.Page.data.entity.getId());
    }
    
    

    Friday, May 23, 2014 9:53 AM

All replies

  • Hi Amy,

    Try add Xrm.Page.context.getClientUrl() at the begining of your url.

    Also you can check the url below.

    http://msdn.microsoft.com/en-us/library/gg328483.aspx#BKMK_OpenADialogProcess

    function openDialogProcess(dialogId, entityName, objectId)
    {
     var url = Xrm.Page.context.getClientUrl() +
      "/cs/dialog/rundialog.aspx?DialogId=" +
      dialogId + "&EntityName=" +
      entityName + "&ObjectId=" +
      objectId;
     window.open(url);
    }



    Friday, May 23, 2014 12:22 PM