Creator Help

Get Records using record ID


Using zoho.books.getRecordsByID() Deluge task in Zoho Creator, you can fetch related records from Zoho Books. You can make use of different workflow options in Zoho Creator to automate this process . Fetch records from contacts, invoices and payments modules in Zoho Books, using the record ID. For example, execute "form actions" in Zoho Creator using the record ID to fetch a contact from Zoho Books. Or configure a scheduler in Zoho Creator to fetch a particular invoice from Zoho Books.

 Supported Modules

  • Contacts
  • Invoices
  • Customerpayments
  • Items
  • Estimates
  • RecurringInvoices
  • Expenses


<response> = zoho.books.getRecordsByID(<module>, <orgID>,<contactID>);

<response> is the map variable returned as response. It contains the details of the newly created record.

<module> is the name of the Zoho Books' module where the record needs to be updated. For example, "Contacts" refers to the Contacts module. The Zoho Books' modules that are supported by Creator are "Contacts", "Invoices", and "Customer Payments".

<orgID> refers to your organization ID as specified in Zoho Books. To know your organization ID, click on <YourOrganizationName> > Manage Organizations, from the top-right corner of your Zoho Books Home page.

<contactID> pertains to the record id that needs to be fetched. Here it stands for contact ID.


  • All the parameters listed above are mandatory.


1) Fetch a contact from Zoho Books using Record ID

In this example, a record is fetched from Zoho Books' Contacts module by adding code to a Zoho Creator form. Upon submission of the form, the record pertaining to the specified record ID gets fetched.

  • Add the following scipt in the "on Success" section of your Zoho Creator form.
response = zoho.books.getRecordsByID("contacts", "12345678","11111000000000001");
  • Submitting the form will fetch the record with ID "11111000000000001" from your Zoho Books. 

contacts is the name of the Zoho Books' Module from where the record needs to be fetched.
12345678 is a sample organization ID. Replace it with your organization ID.
11111000000000001 is the  record ID of the record that needs to be fetched

 Response Format

The following code for getRecordsByID() task,

response = zoho.books.getRecordsByID("contacts", "35201411","12340000000450123"); 
info response;

yields the following response format,

"payment_terms_label":"Due On Receipt",
"contact_name":"Zoho Creator",

If for some reason, the execution fails, the error response will be in the following format:

Error Response for - Wrong value for record id

{"message":"Contact does not exist.","code":1002}

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: