How to use Custom function to search and update for Invoices & Purchaseorders at Zoho Books from CRM?
Hi, I need some help to correct on my existing custom function to search an Invoice_id and Purchaseorder_id at Zoho books from Deals. I"m using contacts email to search for it, but i know there will be a problem if multiple invoices created under the same email. So please help me how to allocate the specific Invoice_ID from Deals accurately and same to Purchaseorder_id.
Thank you
dealdetails = zoho.crm.getRecordById("Deals",dealID);
con = dealdetails.get("Contact_Name");
cont = zoho.crm.getRecordById("Contacts",con.getJSON("id"));
email = cont.getJSON("Email");
searchParam = {"email":email};
response = zoho.books.getRecords("Invoices",716608068,searchParam,"books");
invid = response.getjson("invoices").getJSON("invoice_id");
info invid;