Hi,
I am trying to open a new entity form via an URL (via a button embedded in a webresource).
This is a part of my code:
var depotId = Xrm.Page.data.entity.getId();
var NumDepot = Xrm.Page.getAttribute("pb_num_depot").getValue();
var berichtURL = crm_url + "/main.aspx?etc=10024&extraqs=%26regardingobjectid%3d%257b" + depotId + "%257d%26regardingobjectidname%3d" + NumDepot + "%26regardingobjecttypecode%3dpb_depot&pagetype=entityrecord"
window.open(berichtURL);
Unfortunately the entity Id (var depotId) always contains { at the beginning and } at the end, so the URL can't be opened, since it would only expect the GUID without these special characters.
I already tried to append a string.replace like depotId.replace('{', '') or depotId.replace(/[{}]/g, ''), but this also didn't replace the {}
Any tip for me, how I will only get the GUID without {}?
thx a lot
Thomas
*This post is locked for comments