Skip to main content
Question

Business event upon adding attachment

  • July 2, 2026
  • 1 reply
  • 21 views

Does anyone knows how to do 2 business events, one that fires when you put an attachment on the shipment and another one which fires when you put an attachment on the related invoice using the same GI (SO-SHP-INV GI) I am not concerened about the subscriber you can use any but I just need it to fire on both scenarios

1 reply

craig2
Pro I
Forum|alt.badge.img+4
  • Pro I
  • July 2, 2026

Hey ​@AldrinMuranganwa,

This is a fun one!  You’re going to want to add two tables twice to tie into Files, NoteDoc and UploadFile.  The second time you add them, you’ll want to give them each an Alias, so you can Join to them a second time.  You might be able to just join to the same tables from both the Shipment and Invoice, but I like to separate it:

 

 

NoteDoc has two Note fields, NoteID and FileID (which is just the NoteID of a file).  So, join SOShipment.NoteID with NoteDoc.NoteID, then NoteDoc.FileID with UploadFile.FileID.  That will connect the document to all attached Files.  Then do the same with ARInvoice.NoteID, InvoiceNoteDoc.NoteID, and InvoiceUploadFile.FileID.

That should get you going to set up the Business Event.  Trigger logic would be something like UploadFile.FileID is Not Empty, though I would caution you may have to come up with the guardrails to keep it from firing for every file that gets attached.

Good luck!