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.
*This post is locked for comments
I have the same question (0)