Reputation: 11
I´m trying to call a url to open a phonecall activity in Microsoft Dynamics CRM by passing "directioncode" and "from" but when I pass the parameter "from" with contact Guid it doesn't work.
This Works:
MyCrmUrl/main.aspx?etc=4210&pagetype=entityrecord&extraqs=?fdirectioncode=1
This also works:
MyCrmUrl/main.aspx?etn=contact&pagetype=entityrecord&id={5bda9c95-6569-e511-80d3-000c2986cdc5}
This don't:
MyCrmUrl/main.aspx?etc=4210&pagetype=entityrecord&extraqs=?fdirectioncode=1&from={5bda9c95-6569-e511-80d3-000c2986cdc5}
Upvotes: 1
Views: 1166
Reputation: 1888
You can use the extraqs parameter and url encode the following string: fromid=?&fromname=?&fromtype=? similar to this example:
function OpenEmail(recordid, recordtypecode) {
var params = "pId=" + recordid + "&pName=&pType=" + recordtypecode;
params += "&partyid=" + recordid + "&partyname=&partytype=" + recordtypecode;
var url = "/main.aspx?etc=4202&pagetype=entityrecord&extraqs=" + encodeURIComponent(params);
url = Xrm.Page.context.prependOrgName(url);
window.open(url);
}
Upvotes: 1