#GPPT Tracking changes to Customer and Vendor Cards Version 2

David Meego - Click for blog homepageThis is an update to the previous version of the change tracking projects for Customer and Vendor cards:

Based on the original projects, they have been enhanced to add some more fields into the default fields tracked, add support for array fields, and add support for tracking Modifier Added fields.

The overall design is the same as before, but there have been changes to add functionality requested by the community.

Array fields can now be included in the field lists with the array element number bounded with square brackets [ ].

Also, if you have added fields with the Modifier (and hopefully used GP Power Tools to add the business logic), they can now be included in the tracking project.

Below are screenshots of the two projects showing the components. Here is CUST TRACKING project:

And the VEND TRACKING project:

If you want to change the tracked fields, you can edit the triggers and change the Fields_* comma separated lists at the top (just scroll past all the variable declarations).

The Field names must be the Dexterity Technical Names. You can use the Resource Information window to display the Field Names. If you open it first and make sure it is in “Form, Window & Field” mode with the “Show currently selected Window and Field information” option selected. Or you can use the Tools >> Resource Information option available from any window.

Note: The single quotes should not be included in the comma separated list variables.

To make modified fields work, remove the // comment from the Fields_Modified variable declaration and put in a name for the field. It does not have to be the actual field name. Then edit the associated Runtime Execute script (same name as Trigger) to uncomment the code to run on the modified window (first { and last } ).

If you need access to data from the standard GP table for the window, you can uncomment the code that reads the table.

Then change the case statement to add your field name  (must match the name used in the Trigger’s Fields_Modified variable). Finally get the value from the window for FieldNew and read the value from the table for FieldOld. The Helper function for reading data from the DUOS (Dynamic User Object Store) is already in the code, but you could change this to read the data from other locations (including reading data from SQL).

WARNING: If you already have the previous versions installed, please make a note of the Fields included if you have changed the field lists before importing, so you can remake the changes after installing the updated projects.

Downloading and Installing

Download the example code, import using the Project Setup window (now possible for first time imports with Build 28.8 onwards), or use Configuration Export/Import window (for older builds):

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

More Information

For more information see:

Hope you like the improvements


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

One thought on “#GPPT Tracking changes to Customer and Vendor Cards Version 2

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.