Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 137182

Forum Post: URL incorrect when calling dialog

$
0
0

I am trying to call a dialog that initiates a prompt and response when a task is marked as complete, using a custom button. When the button is clicked I receive an error "The URL you used to start the dialogue is incorrect."

The jscript code I am using is as follows:

function LaunchModalDialog(dialogId, typeName, recordId)

{

 var serverUrl = Xrm.Page.context.getClientUrl();

 recordId=recordId.replace("{", "");

 recordId=recordId.replace("}", "");

 dialogId=dialogId.replace("{", "");

 dialogId=dialogId.replace("}", "");

// Load Modal

var serverUri = serverUrl + '/cs/dialog/rundialog.aspx';

var mypath = serverUri + '?DialogId=%7b' + dialogId.toUpperCase() + '%7d&EntityName=' + typeName +'&ObjectId=%7b' + recordId + '%7d';

// First item from selected contacts only

window.showModalDialog(mypath);

// Reload Form

window.location.reload(true);

}

Can someone point me in the right direction?


Viewing all articles
Browse latest Browse all 137182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>