I want to auto update fields in Projects when a similar field in QueueItems changes. The 1:N relationship is msdyn_project_QueueItems, with a lookup field labeled "Object."
I am using the following code and getting a non-descriptive message.
function VPNApplicable_Opt() {
var entityVarSent, entityVarRecieved, entityVarApplicable, lookupFieldObject;
lookupFieldObject = Xrm.Page.getAttribute('object(Project)');
if (lookupFieldObject.getValue() != null) {
entityVarRecieved = lookupFieldObject.getValue()[0].id;
entityVarSent = lookupFieldObject.getValue()[0].entityType;
entityVarApplicable = lookupFieldObject.getValue()[0].name;
alert(lookupFieldObject + ' lookupFieldObject \r\n' +
entityVarRecieved +' entityVarRecieved \r\n' +
entityVarSent + ' entityVarSent \r\n' +
entityVarApplicable + ' entityVarApplicable ');
} else {
alert(lookupFieldObject + ' is not an entity');
}
}
I suspect the lookup field is incorrect but can't figure out the right value.
*This post is locked for comments