Function #54: Auto-populate date and time of invoice creation in custom field

Hello everyone, and welcome back to our series!
Zoho Books maintains a detailed log of every action performed within the application, whether it's creating, updating, or deleting records. The
Audit Trail provides information on how, when, and by whom a transaction was modified. Additionally, the Comments & History section of each record displays the exact creation date and time, along with a list of all changes made since its creation.
These logs serve as internal references, helping you and your team monitor the creation or modification timeline of records within Zoho Books.
Furthermore, beyond internal use, your customers may need to know the exact creation date and time of a transaction for various reasons. Accurate timestamps can serve as proof of when a financial obligation was incurred. Also, providing this level of information ensures transparency and facilitates smooth business operations between parties.
To share this information with your customers, you can use today's custom function that automatically fills in the date and time of invoice creation in a custom field once the invoice is saved.
Prerequisites:
1. Create a custom field named "
Created Date and Time" for Invoices.

2. Create a
Connection named
"zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.

Note: The custom function will be executed after the invoice is saved.
Custom Function:
Navigate to Settings -> Automation -> Workflow Actions -> Custom Functions -> +New Custom Function -> Add the function code from this
GitHub link -> Save.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-


In the final step of this workflow rule, associate the custom function you created and then hit Save.
If you require this function for a different module, please contact our Support team at support[at]zohobooks[dot]com. We are always ready to assist you with your custom function needs.
Regards,
Shireen Farhana
Zoho Books