Hello,
When I built an onLoad websuorce, error message:
ReferenceError: Web resource method does not exist: getSubjectLookupId
Error Details:
Event Name: onload
Function Name: getSubjectLookupId
Web Resource Name: abc_casesubjectidlookup.js
Solution Name: Active
Publisher Name: DefaultPublisherxxxx
I'd like get the Subject entity's GUID (lookup field) when I load the Case entity form. My script:
function getSubjectLookupId(executionContext) {
debugger;
var formContext = executionContext.getFormContext();
var lookupObj = formContext.getAttribute("subjectid"); //Check for Lookup Object
if (lookupObj != null) {
var lookupObjValue = lookupObj.getValue(); //Check for Lookup Value
if (lookupObjValue != null) {
var subjectId = lookupObjValue[0].id, // To get record GUID
if (subjectId != null) {
Xrm.Utility.alertDialog("ID: " + subjectId);
}
}
}
}
Could you please help to analyze what cause the error? Thanks.