Error handing while use client script in zoho crm for Cannot read properties of undefined

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 ?

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now