How to Add and Integrate Custom Tables into Sales and Purchase Orders
In many business workflows, standard document fields aren’t enough to capture the specific data required for unique projects or delivery needs. This blog walks you through how to extend your existing documents, such as Sales Orders or Purchase Orders, by adding custom tables. Whether you need to track project requirements, employee assignments, or specialized logistics data, custom tables provide a flexible way to manage information that goes beyond simple header or item-level fields.
Step 1: Define Your Custom Table
The first step is to navigate to the Custom Fields section of the document you wish to modify. While standard custom fields can be added to the document header or item level (for example, a “type of delivery” list), a custom table allows for a list of multiple entries within a single document.
- Locate the Custom Table Option: This option is situated within the logical position of the document settings.
- Name the Table: Provide a name, such as “Sales Requirements”.
- Create a Blockly Name: Assign a shorter name for use in the Blockly logical programming language if you plan to use automation scripts later.
- Add Your Fields: You can choose from various field types including:
- Free Text or Numbers.
- Dates (e.g., “Date of Requirements”).
- Lists and Amounts/Prices/Quantities.
- Entities: Link the table to other parts of the system like Employees or Work Orders.

Step 2: Using the Table in a Document
Once configured, the custom table will appear within the document interface (e.g., a Sales Order).
- Navigate to the Custom Fields tab of your document.
- You will see your new table (e.g., “Sales Requirements”) where you can add rows of data.
- Example entries might include project numbers, director names, emails, and additional info for specific projects.

Step 3: Printing and Reporting
To ensure your custom table appears on outgoing documents, you must add it to your report layout.
- Open Report Designer: Select the document type (e.g., Sales Order).
- Create a Copy: It is best practice to copy the existing report to a new template.
- Insert Table Source: Add a new table element to the report design.
- Map Column Data: Link the columns in the report to the elements in your custom table (e.g., mapping “Employee” and “Date” columns).
- Finalize Design: You can adjust the spacing and layout to ensure the table prints clearly under the main document details.

Advanced Options: Automation and Integration
For more complex needs, custom tables support advanced automation:
- JSON Integration: Custom tables can be included in JSON exports, which is useful for supplier invoices or external data processing.
- Blockly Scripting: You can use trigger or on-demand scripts to interact with the table. For example, a script can automatically add new rows to the “Sales Requirements” table based on specific document variables or parameters, such as copying a project number from the main document.




Conclusion
Integrating custom tables into your sales and purchase orders allows for a high degree of personalization. By following these steps, you can move from simple data entry to a robust system that captures complex project requirements, supports automated scripting, and generates professional, data-rich reports. This flexibility ensures that your system evolves alongside your specific business needs.



Recent Comments