Purchase Order Attachments: How are they linked?

Hello!

I’m running into a bit of a wall while trying to make a customization to the PO Approval application. I’m trying to see if I can show the attachments that are linked to the selected PO that’s being approved. I tried following the trail from the Purchase Order screen itself, but I’m unable to see any calls being made while running both Debug Tool, nor Chrome’s DevTools. I did find that the attachments can be found through Ice.BO.AttachmentTransferSvc → GetFileStoreList. But, I see nothing that can be used to actually find which ones are attached to specific POs. Am I missing something?


image

Thank you very much!

I’ve made a couple functions/BPM’s that check for attachments. I typically just make a LINQ call to ice.XFileAttch and XFileRef and sort the data from there.

If I have a dataset at hand, those often include DataTables for attachments too. In your case, the PO service is going to give you the POHeaderAttch, PODetailAttch, and PORelAttch tables which show documents attached to POHeader, PODetail and PORel objects. Calling the PO GetByID method will populate those tables without you needing to call the Attachment service directly.

If I needed to grab a doc from the vendor linked to the PO, I’d could call Vendor.GetByID using the vendorNum in POHeader. That method will return VendorAttch table.

I’ve only had to call the Attachment service for two uses. The first is when I needed to parse metadata on ECM uploads. AttachmentSvc.DocStarGetMetadata is the method and you need the XFileRefNum to use it. The second is when I wanted to automatically download work instructions when users started a process that required them.

1 Like

Thank you so much! That POHeaderAttch is EXACTLY what I needed - I wasn’t aware of accessing that through the PO service. I was able to pull that, passing the PO Num through as a parameter, and get the list of the attachments. Thank you!!

1 Like