Trying to integrate Zoho Invoice to CRM

Trying to integrate Zoho Invoice to CRM

I would like to use a custom function to create a Potential in CRM whenever an estimate is sent. Having some difficulty.

1. How does Zoho link a Invoice customer_id with a Contact or Account id in CRM?

2. Currnently, I find the Company-name from the estimate and then look it up the Account in CRM. That is working. When I try to read the ACCOUNTID, I get a "Text can not be cast to Number message. Here is the offending code...


CustName = estimate.get("customer_name");
Cust = zoho.crm.searchRecordsByPDC("Accounts","accountname",CustName);
AcctID = Cust.get("ACCOUNTID");

The last line causes the error. I am able to see the contents of Cust and there is definitely data in there called "ACCOUNTID". I just can't read it in this custom function.

      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 WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • 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