GP Batch Attach Payables Documents

Last up for now is my Batch Attach add-in. We tend to use Integration Manager at work to upload lots of invoices. In this day and age, there has been a push to move everything electronic and stop wasting so much paper. The new document attach feature was great addition over the old OLE notes which made attaching documents much easier and more intuitive. Unfortunately manually attaching 100+ PDF invoices every week is cumbersome.

There is where I stepped in. Using a vendor ID and document number, I navigate to the payables transaction zoom window and essentially use my Quick Attach code to attach the file that you designate. Since this is all done via Sanscript/Continuum this all happens in milliseconds so looping this through 100+ invoices takes seconds.

I read information from the Clipboard so the information that needs to be copied from Excel or any Tab-delimited file is Vendor ID, Document Number, and the file path of the document.



Before the attach process starts, I verify that the document number provided exists for that vendor and that the file path provided is accessible.


A confirmation window will appear displaying the number of successfully attached documents.


Note: There is a function I used in Continuum that I was not 100% of the last parameter. I have verified that it works on our installation of GP but as I said before, I have no ability to test on a different configuration.

Prerequisite: At least 2013 R2 must be installed as this uses the new Document Attach module not the old OLE notes version.

Installation: Copy the dll into the Add-ins folder in your Microsoft Dynamics GP installation directory

Use: Batch Attach currently only works with the Payables module. It can be accessed from the following windows from the Additional menu on the toolbar if installed properly:

  • Payables Transaction Inquiry – Vendor
  • Payables Transaction Inquiry – Document

Download: GPBatchAttach.dll (Version 1.0.5578.19243)

Sample template: Batch Attach Template.xlsx



Disclaimer: I am very much an amateur programmer. I have never taken an official Microsoft course. I cannot guarantee any code/program that I provide as I only have the ability to test my work on a small sample set. Users accept all the risk of using anything I provide and are encouraged to thoroughly test in a dedicated test environment before moving to production. Files I provide are free for use and are not to be resold. By using my files you agree to not hold me liable for any damages caused by said files.


10 thoughts on “GP Batch Attach Payables Documents

  1. Hi James,
    That sounds like a great utility for all the users out there that have not been using OLE Notes in the past, but have tons of eDocuments to attach in the new GP versions.. I’m going to test this with our GP2015R2 and give you some feedback.


    • Hi Beat,
      Feedback is greatly appreciated! I’d be open to showing the source code or a more in-depth analysis of how it works if you/others want. I only focused it on AP as that is where the bulk of the attachments occurred in my previous workplace, but it could theoretically be coded for any window/module. However I no longer have access to a GP environment so any adjustments I would have to make would be in the blind (I still have the SDK and can code, just not test).

      Liked by 1 person

      • Hi James,
        That’s great news.. For sure that I’d be interested in expanding probably the tool .. need to do a quick survey on GPUG Collaborate for example..
        As for a testing environment, do you have an MSDN subscription ? you could use one of the GP VM images on Azure to setup a test environment.. it includes already the SDK and VS tools. If not, I might be able to provide you access remotely to one of my Azure VM where GP is installed… so you run some validation and testing. The thing is that those VM’s are not up & running all the time, so it would have to be coordinated.


      • Hi Beat,
        Thanks for the info/offer! I do not have a MSDN subscription unfortunately as my current work would not make use of one. If we collaborate down the road it would be great if I could make use of a VM from time to time.

        I’ll write up a post to outline how this particular tool works to give people an idea of how easy/hard it would be to scale to other modules/windows.

        Liked by 1 person

  2. Hi James,
    I’ve a user from the GPUG community here in Montreal that was curious to know if that add-on could be easily rewriten to support also the AR side of document attachement in GP.. They seem to use the current add-on for AP pretty well and also a lot..


    • Hi Beat,
      It can theoretically be applied to any window, but unfortunately I have no test environment. If I had an environment I could probably re-write it in a couple days. Does the user have any form of internal IT/Development team? I could provide the code and explanations but that may be too daunting depending on their level.



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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