customer_id vs contact_id
Hi! I have a situation with Customer custom functions and custom buttons:
I've made a custom function for a Sales Order. I can get a customer_id from the Sales Order object. With this customer_id I get the contact invoices:
customerID = salesorder.get("customer_id");
invoices = zoho.books.getRecords("Invoices",orgID,"customer_id=" + customerID);
Everything fine, there is still no problem.
But if I make a custom function for Customers, how (the hell) can I get the related invoices? I've tried with all the ID-like fields from the customer object. Could you help me with that?
Thanks in advance.
Regards