Hi
I am new to javascript and am trying to create a dynamics url to open a dialog box.
To get the object id for a record I use the selectedItem.id
This gives me a result in this format {406CE8D0-8757-E811-A821-005056A14CB5}
To use this in a URL I need to get rid of the { and }. How is this possible?
Thanks for help!
My code:
function run(selectedItems)
{
var selectedItem = selectedItems[0];
var url = Xrm.Page.context.getClientUrl()+ "/cs/dialog/rundialog.aspx?DialogId=%7b2DED86E4-AAA5-4317-B07C-E3938A170002%7d&EntityName=incident&ObjectId=%7b"+selectedItem.Id + "%7d";
// Here you can use the information below to open a new window or whatever!
alert(selectedItem.Id);
alert(url);
window.open(url, "", "height=700, width=550");
}
*This post is locked for comments
I have the same question (0)