Adding your own code

There are several opportunities to add youi own custom code to the system. This may be a few lines of code in a configuration file or a module stored in the bin directory.
Before an edit form is produced: This is most useful when data is pre-populated for the form. For example in our test data a sales order number is automaically passed on when creating a sales order line. We use a small function to read the sales order record and also pre-populate the order line with the customer number as well.
- Before the data is processed: Used to add additional informtion to the data, such as extending units time price to give the cost.
- After the data is processed: Used to update other parts of the database with the information just added.
You can also use a few lines of Javascript to summarise a document content for reports. This is typically combining fields in the document with some fixed text.