#GPPT Linking to Document Management Systems

David Meego - Click for blog homepageThis sample is something that I have already helped customers achieve with GP Power Tools in the past but it had not been posted as a sample on the blog. The ability to link with a document management system by opening a URL with data from any window in Microsoft Dynamics GP is really easy to do.

This sample project allows scanned payables invoices to be opened in a web browser from the Payables Transaction Inquiry – Vendor and Payables Transaction Inquiry – Document windows as well as the Payables Transaction Entry Zoom window.

The project uses a trigger to add an Additional Menu option to the window (with the Ctrl-D keyboard shortcut) to open the Document Management system. There is one trigger for each window.

The trigger is set up to read the values needed from the window into variables and then check that it has values and the document type is correct. Then it will load the URL link template which is stored as a message using the placeholders %1 for Vendor ID and %2 for Document Number and substitute the actual data into the URL. Finally, it will open the URL using the appropriate command depending of if it is running on the Web Client or Desktop Client.

If the data values do not meet the requirements, it will abort the script after setting the OUT_Condition to true.  The actions tab contains the settings to load an error message from a message and display it to the screen in a warning dialog.

To change the link needed to match your system, just edit the PM DOC MANAGE01 Message resource.

To change the wording of the Error message, just edit the PM DOC MANAGE02 Message resource. If running on a multi-lingual environment, you can enter different messages for each language.

Finally, to add the functionality to other windows, duplicate one of the triggers and change the window on the Resource tab and then use the same code, just changing where the data values are read from.

If you want the functionality accessed via a button rather than the Additional menu, you could modify the window to add a pushbutton and then use a trigger after the field change event of the modified button to run almost identical code.

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.