#GPPT Automating Applying of Payables and Receivables Documents

David Meego - Click for blog homepageThis is another one of those articles that I have been planning to write for a long time. A while ago I created some prototype scripts with GP Power Tools to show how it would be possible to “drive” the user interface to automate applying of both Payables and Receivables documents.

I have had a few people contact me about this functionality, usually because my friend and fellow MVP, Steve Endow, has told them about these scripts.

The prototype scripts worked using a GP Power Tools Parameter List ID to ask for the values of the apply information and then use that data to “drive” the Apply Payables Documents (PM_Apply_To_Maintenance) and Apply Sales Documents (RM_Cash_Apply) windows as though the user entered the data.

Below is what the Apply Payables Parameter List dialog looks like, so you can see the data fields used:

Below is what the Apply Sales Parameter List dialog looks like, so you can see the data fields used:

Once the OK button on the dialogs is clicked, the rest of the script executed and “drives” the user interface to perform the apply. It uses the Find feature to locate the Apply To document, but does it by calling the same code without actually opening the window.

Recently, I worked with a customer to take the prototype scripts and actually make the usable. This was achieved by linking them to another script to read a CSV (Comma Separated Variable) file from Microsoft Excel and use the data imported to programmatically set the Parameter List values and then execute the original script for each row to perform multiple applies.

The final part was using Trigger Setup to add an Additional menu option to the Apply windows to call the CSV import script.

This turned the prototype scripts into usable examples that can be used by anyone with the GP Power Tools – Developer Tools module registered.

Future enhancement ideas for these samples could be to ….

  • use Runtime Execute to create a Service Based Architecture (SBA) web service end point that can be called externally to perform the apply transactions. This could work either by passing in transaction data, or the path to a CSV file.
  • use Trigger Setup to setup a scheduled, timed or login process that can be used to initiate the import of the apply transactions.
  • use the new Clipboard functions in Build 29 of GP Power Tools to take data copied from Excel and parse the tab delimited data set rather than a comma delimited file and call the apply scripts.

For now I will publish what I have which is example CSV files and the code to import them from an Additional menu option added to the Apply windows.

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:

Please update to GP Power Tools Build 29 or later if you haven’t already to get all the latest features and resolve the Security Vulnerability issue.



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.