Error handing while use client script in zoho crm for Cannot read properties of undefined
Hi Folks, I´m using client script to get values from Accounts module to Quotes module using this piece of code
var accountrecord = ZDK.Apps.CRM.Accounts.fetchById(account.id);
if (accountrecord._Rating == null) {
do someting;
}
In the console I'm getting this error message when the account record is in a middle of an appoval process and the script stop to work.
Cannot read properties of undefined (reading '_Rating')
Anyelse know how can I handling this type of errors in order to baypass the line when it ocurr? In other hand is common that zoho crm block this records when an approbal process is working ?