Tuesday, August 27, 2019

Dynamics GP Attachments - 2 strange animals

We have been jumping into document attachment in GP.  Along the way we encountered some odd issues.  Part of this odd-ness comes from the fact that there are actually 2 separate document attachment processes in GP - one for the main GP dictionary and one for the HR dictionary.

As we have been doing most attachments in the HR/PR area I've quickly realized that this one is a bit under-documented.  For example there are plenty of citations to the main dictionary attachment tables, which range from CO00101 to CO00105.  However I can find few references to the HR attachment tables.

By using GP's Table Finder (on any GP window click Tools > Table Finder) you can find all kinds of juicy info about what you are looking at.


Notice that the box in the bottom left portion of the window shows the Tables involved in this window.  Also notice the tables for this window (HR Attachments) are HR tables.  Furthermore the "Product" is indicated to be Human Resources (HR.)  Normally I use the TableList.xls document in the GP SDK to find tables, but these are not listed there.  Oddly these tables are all in the DYNAMICS database.

HR_AttchRef (HRREF003)
HR_AttachMSTR (HRATT001)
HR_AttachStatus (HRSTA002)
HRAttachmentItems

So the Product being HR is a big clue that there are two separate processes.  This is due to the dictionary architecture of GP and the fact that HR is still a separate dictionary.  While I understand this is the easy way to do this I wonder how hard it would have been to stick with just one attachment process in the main dictionary?

This has interesting implications.  For example in GP under Administration > Setup > Company the Document Attach Setup window has some options to select related to attachments.  However these likely only apply to the main dictionary attachments.  We've not seen any of those options apply to attachments in the HR area.

Probably the worst feature of Doc Attach in GP is the removal.  It is virtually impossible to permanently delete a single attachment.  When you delete from the Attach window it moves to the Delete tab.  From there it can only be removed using the Delete Attachment Files, which is different for the main dictionary and HR.  Further that utility only allows removal with a Date cutoff.

So it's likely my next enhancement to GP will be to allow removal of individual attachments.

No comments:

Post a Comment