Zoho Books Custom Fields
This script will get custom field records from an Invoice, then update the custom fields on the Invoice.Configuration
This function is intented to run in Zoho Books. You must have custom fields on the record you are working on. Learn to create custom fields in Zoho Books here.
Note: Only custom fields with values will appear in the custom_fields key in the Invoice record.
// Get Record and Organization Variables
invoiceId = invoice.get('invoice_id');
organizationId = organization.get('organization_id');
/*
Get Custom Fields from Record
*/
// Get Custom Fields and Iterate over each Custom Field
customFields = invoice.get('custom_fields').toList();
for each customField in customFields
{
label = customField.get('label');
value = customField.get('value');
}
/*
Update Custom Fields on Record
*/
// Create List of Custom Fields
customFieldList = List();
customFieldMap1 = Map();
customFieldMap1.put('label', 'YOUR CUSTOM FIELD LABEL');
customFieldMap1.put('value', 'YOUR CUSTOM FIELD VALUE');
customFieldList.add(customFieldMap1);
// Create Map for Updating the Invoice
updateInvoiceMap = Map();
updateInvoiceMap.put('custom_fields', customFieldList);
// Update Invoice
updateInvoice = zoho.books.updateRecord('Invoices', organizationId, invoiceId, updateInvoiceMap);
info updateInvoice;
Click here to copy these scripts. For more Zoho-wizardry, check out our GitHub page.
Want to learn even more?
Sign up for one of our Zoho courses!
0 Lessons
Should I Use Zoho Meeting, or Another Webinar/Web Conferencing Tool?
0% Complete
0/0 Steps
Want this functionality, but don't want to do it yourself?
Click here to speak to us!
Need help with your Zoho system?
Hire a full time Zoho System Admin from our poolof highly qualified program graduates!

Related Resources
This set up allows you to insert subform rows and add to picklist dynamically with...
Deluge script for sorting lists containing maps by the specific key (by date-time/alphabetical...
When scripting, ask yourself this question - will this value ever be null? If it's...
This script allows you to create a HTML table in Deluge with dynamic rows, then merge...
When a Zoho CRM record is created/updated/deleted via Deluge, the system does not...
Click Here to Apply
Description
Location
Bastrop/Smithville area
Role
Entry...
Click Here to Apply
Description
Location
New Braunfels area
Role
The Partner...
This tutorial will illustrate how to create a custom function (using Deluge scripting)...
This tutorial demonstrates the integration between Shopify and Zoho Inventory. Use...
This tutorial provides a Creator script that loads related records from Zoho CRM...