I am troubleshooting an issue where creating Phone Call records from the Quick Campaign functionality in that now phone call records get created. Looking at the Phone Call form I see the following JavaScript that appears to be causing it to fail:
function retrieveUserReqCallBack(retrieveUserReq)
{
if (retrieveUserReq.readyState == 4 /* complete */)
{
if (retrieveUserReq.status == 200)
{
var retrievedUser = this.parent.JSON.parse(retrieveUserReq.responseText).d;
if (retrievedUser.FullName != null) var setUservalue = new Array();
setUservalue[0] = new Object();
setUservalue[0].id = Xrm.Page.context.getUserId();
setUservalue[0].entityType = 'systemuser';
setUservalue[0].name = retrievedUser.FullName;
Xrm.Page.getAttribute('from').setValue(setUservalue)
}
else
{
}
}
}
I didn't write this code but it appears that the line that updates the 'from' field is causing the Quick Campaign job to fail. Commenting out this function or just the line 'Xrm.Page.getAttribute('from').setValue(setUservalue)' allows the phone call records to be created.
Is there something wrong with the way the JavaScript is written or will this sort of thing never work with Quick Campaign?
*This post is locked for comments
I have the same question (0)