#GPPT Tracking changes to Item Cards Version 2

David Meego - Click for blog homepageAfter the publishing of the GP Power Tools projects for tracking changes to Customer and Vendor Cards, there are been requests for the same functionality for Item Cards.

Starting with the framework updated in the version 2 of the Customer and Vendor tracking projects:

I have created the same functionality for Item Cards. It is labelled as Version 2 so it stays in sync with the other trackers. Even though this is actually the first release, it is based on the Version 2 code.

The Item tracking project currently works for the Item Maintenance, Item Currency Maintenance, Item Internet Information, Item Quantities Maintenance, Item Vendors Maintenance, Item Resource Planning Maintenance and Customer Item Maintenance windows.

It can handle arrays, needed for the Item Category Fields 1 to 6 and can handle fields added using Modifier. The example code already has what is needed to track the Item Category Fields 7 to 12 added with the example project below:

Below is screenshot of the ITEM TRACKING project showing the components:

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).

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:

Enjoy

David

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

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.