Attach file to PO based on Part Class?

What is a good way to automatically add an attachment to a PO based on line part class?

Eg if a PO is created with Part # ABC-123 on Line 1, with part class SPECIAL, I want it to attach “SPECIAL INSTRUCTIONS.pdf” to the PO header.

Ideally I’d have the file attached to the part class, and then copy the attachment over when the PO line is added with that part class. But I don’t see that you can add attachments to part class.

I supposed I could hard code specific attachments to specific part classes in the BPM… but that sucks. And I would rather not add more database fields. Maybe best to use usercodes to set up the relations?

Any other ideas?

And where might I attach the file initially (the “daddy” attachment)? Can’t put it on part class, doesn’t make sense to put it on a specific part or supplier… I’m kinda stumped here.

Thanks for helping me think through this.

Details FYI - We have some purchased parts that have specific vendor instructions for requirements when delivering those parts. Currently the purchasing agents just know to include those instructions when they send over the PO. I’d like to add the instructions as a PO attachment in Epicor. Along with the regular line attachments for parts (drawings, dxfs, excel files etc).

Related posts…

User Codes would be a good place if you don’t want a UD field. Or you could use a SysTag.

I’d personally add a field.

What type of file storage is it? You could just store the info needed to create and retrieve
the attachment in the User Codes.

Hmm ok thanks I’ll think through that some more.

I’m going to give the files a network location (link attachment) instead of having the file stored inside Epicor’s repository.

Like a network share, or like a sharepoint link?

If you store something like a sharepoint link with your ud code, you could use the epicor
tooling to retrieve the file, or the link and do the attachment in the appropriate bpm.

FYI, if useful to others, I decided to attach the file to an operation, as we have attachments on other subcontract operations. Then made 2 BPMs - one on POUpdate (pre) and one on PoSugg.Generate (post). Hard coded the partclass-to-operation link. They use BOs to copy attachments from OpMaster to the POHeader. I prefered doing it this way than direct DB writes in a data directive.

The tricky thing with PO generate is that there isn’t an easy way to get the generated PO #s, as discussed in that thread I linked. I did it by searching for open PO lines with PoSugg’s PartNum, sorted by PONum desc. Not airtight but should work for all intensive purposes…