Hi All ,
Can anyone help me to create opt out URL's for contacts with their user id?
*This post is locked for comments
Hi All ,
Can anyone help me to create opt out URL's for contacts with their user id?
*This post is locked for comments
Thanks it worked for me
Hi Rajasimha ,
you could use the following functions:
// GetCurrentEntityPage() function GetCurrentEntityPage() { var org = Xrm.Page.context.getClientUrl(); var entitycode = Xrm.Page.context.getQueryStringParameters().etc; var entityid = encodeURIComponent(Xrm.Page.data.entity.getId()); return 'https://' + org + '/main.aspx?pagetype=entityrecord&etc=' + entitycode + '&id=' + entityid; } // GetEntityPage(2, contactid); function GetEntityPage(entitycode, entityid) { var org = Xrm.Page.context.getClientUrl(); entityid = encodeURIComponent(entityid); return 'https://' + org + '/main.aspx?pagetype=entityrecord&etc=' + entitycode + '&id=' + entityid; }
Please let me know if you solve.
If you found the answer helpful, please mark as Verified
Join my network on LinkedIn Follow me on Twitter
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY
Independent Contractor
Hi Raja,
Pls use the below code.
var orgURL = Xrm.Page.context.getClientUrl();;
var recordId = Xrm.Page.data.entity.getId().replace("{", "").replace("}", "");
var entityName = Xrm.Page.data.entity.getEntityName();
//Get the object type code dynamically following the above url
var objectTypeCode = 1; //for account entity
var recordURL = "https://" + orgURL + "/main.aspx?etc=" + objectTypeCode +
"&id=%7b" + recordId + "%7d&pagetype=entityrecord";
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,409
Most Valuable Professional
nmaenpaa
101,156