Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Error with formContext

$
0
0

I am getting an error when I try to call the following function from Dynamics 365 (CRM ver 9.0)

function addTask(executionContext) {
var formContext = executionContext.getFormContext();
Xrm.Utility.openEntityForm('task', null, {
pId: formContext.data.entity.getId().replace(/{|}/g, ''),
pType: Mscrm.EntityPropUtil.EntityTypeName2CodeMap[formContext.data.entity.getEntityName()],
pName: formContext.getAttribute('name').getValue()
});
}

Using browser debugger, I captured the following error:

TypeError: Unable to get property 'EntityTypeName2CodeMap' of undefined or null reference
 at addTask

I am not seeing what is causing the problem.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images