Invoice Get Record Error Message - Code 57

Invoice Get Record Error Message - Code 57

Hi everyone, 

Running into an issue where running below code in Zoho Books Custom function gives me following error.

Would greatly appreciate if anyone can explain and help me resolve the issue

Purpose of the function
Grab other invoices currently open under the Customer


Error message

{"code":57,"message":"You are not authorized to perform this operation"}

Custom Function

customer_id = invoice.get("customer_id");
search_map = {"customer_id":customer_id};
ExistingInvoices = zoho.invoice.getRecords("invoices","XXXXXXXXX",search_map);
info ExistingInvoices;