Question on messaging by Pankaj Mathur, on 7/12/20: How can I automatically generate a record number, for example Invoice Number which will have a prefix “INV” and followed by a running number. Example - INV00001, INV00002, INV00003, INV00004, etc.
This can be done by creating an automation script.
You will need a Settings module where you will keep the next invoice number. Therefore create a number field that will keep the data.
Create a record for the Settings module with the next invoice number defined, for example 1.
In the Invoice module, create a text field that will store the INV00001 value.
In the automation script that triggers on create on the module Invoice, you can then fetch the next Invoice number from the Settings module you created. And the save the new Invoice Number with the prefix to the text field in Invoice module.
newNumber = ‘INV’ + formatedNumber
Make sure to increment the next invoice number in the settings record.
In the version 2020.12 we are introducing field expressions that will make a task like this much easier.