Hi, I have a requirement where I have to write code on Address Form. I tried just a simple alert message code on Address Form, but I am getting error. Uncaught Error: address: type argument {1} is not a valid record or is not available in your account. Please see the documentation for a list of supported record types.
Not sure what is going wrong, please help.
Below is the code which I tried:
/**
@NApiVersion 2.0
@NScriptType ClientScript
@NModuleScope Public
*/
define([], function (){
function showMessage(context) {
var sAddr = context.currentRecord.getValue({"fieldId":"Addr1"});
if (!sAddr)
{
alert("ADDRESS 1 field is Empty !!");
}
}
return{
pageInit:showMessage
};
});