#GPPT Beginner’s Guide to Adding Custom Fields – Update: Using Custom Tables

David Meego - Click for blog homepageWelcome to the eleventh article as an update to the series of articles that explains in detail the steps to add a user defined custom field to a window using Modifier, Report Writer and GP Power Tools to add the business logic.

The series should be read in order starting with the introduction article:

In this article we will show how to use Custom Tables (added in Build 32) to store data rather than the DUOS table. In the previous articles we included the Customization Maintenance packages and showed how to use manual SQL tables.

To understand the original version of the project which adds an Item URL field to the Item Maintenance window and stores the additional field in the DUOS (Dynamic User Object Store – SY90000 table), please review the earlier articles in this series starting with the Introduction.

This is an updated version of the project using a GP Power Tools Custom Table to store the data instead of using the DUOS. Using a Custom Table allows all the separate fields to be stored in a single record with the fields of the appropriate data types. This is better than the DUOS which stores each field as a separate string record. The creation and maintenance of a Custom Table is handled automatically by GP Power Tools. Using Custom Tables works much better than manual SQL tables.

Access to the Custom Table uses a series of Custom Table Buffer Helper Functions which replicate how Dexterity table buffers work. Inserting the required functions for common actions can be handled in bulk by using the Action Helpers.

Here is the ITEM URL3 Project

Trigger ITEM URL3 BUTTON

This trigger is used with the hidden zoom button used to drill down and open a web browser to the address stored in the Item URL field. It uses a different method depending on if it is running on the Web Client or not.

Trigger ITEM URL3 DEL

This trigger runs after the IV_Item_MSTR table delete event and delete the Custom Table record.

Trigger ITEM URL3 FIELD

This trigger runs when the Item URL field is entered and ensures that the https:// prefix has been added.

Trigger ITEM URL3 READ

This trigger runs after Display Existing Record Field Change event and reads the Custom Table record and populates the Item URL field

Trigger ITEM URL3 SAVE

This trigger runs after the Save Record Field Change event and saves the Custom Table record from the data read from the Item URL field.

Runtime Execute Script ITEM URL3 GET

This script works with the rw_TableHeaderString Report Writer function to return the Item URL field to a report. It has been used with the Detailed Item List modified report. It reads data from the Custom Table record.

SQL Execute Script ITEM URL2 MOVE

This script contains the SQL Select statement to move the DUOS data from the original version of this project into the Custom table.

Custom Table ITEM URL3 TABLE

This is the definition for the Custom Table. The associated SQL table is automatically created and maintained in all company databases. Additional fields can be added as needed, and the table will automatically update in all the company databases.

Downloading and Installing

Download the example code, import using the Project Setup window (without any project showing, select the path to the xml file and click Import):

The code will be active on next login or after switching companies, or you can start the triggers manually from the Project Setup window.

Note: If you have previously used Version 1 of this sample with data stored in the DUOS (Dynamic User Object Store) SY90000 table, please use the SQL Execute script ITEM URL3 MOVE and either remove or disable the old ITEM URL or ITEM URL2 projects.

More Information

For more information see:

Hope you find these examples useful.

David

16-Mar-2026: Added note about moving data and removing or disabling the old ITEM URL or ITEM URL2 projects.

This article was originally posted on http://www.winthropdc.com/blog.

One thought on “#GPPT Beginner’s Guide to Adding Custom Fields – Update: Using Custom Tables

Leave a Reply