I have done some scripting on Address Form for setting some fields, the script is working fine on Address form. BUT when I click OK and the focus goes to Address sublist under Contact and click Add button it throws error. I am invoking Client script on click of Add button which does some validation on address fields, but I am getting error on line
nlapiGetCurrentLineItemValue('addressbook', 'addr1');
Error:
nlobjError {id: null, code: "UNEXPECTED_ERROR", details: "TypeError: Cannot call method "createElement" of undefined (INVOCATION_WRAPPER#921)"
I am not sure why ?? Can anyone tell me whats the issue?