Sales Order - New Attachment Notification

Good afternoon Epicor community,

I have a current data directive in place that notifies a specific group of people via email when a new file is attached to a Sales Order (new or existing).

Using the XFileAttch table, when a new record is created & where RelatedToFile = “OrderHed”, send an email (that references the Sales Order Number (Key1), and the attachment number).

This has been a good start, but the problem I’m having is that I am not able to reference any other data that would be helpful for the person receiving the email (such as Customer/CustID, Part, etc.).

So they are notified successfully when a Sales Order has a new attachment, but many of these are not relevant to their department, since this is a notification for ALL sales order attachments.

I have a few ideas on how I might be able to accomplish this, but before I spend any more time going down these rabbit holes, I wanted to bounce this off the community and see if anyone has ever done anything like this or knows of a better way I could accomplish this.

As always, thank you in advance for your help.

Hey Mike,
I wouldn’t see any issues doing a small query inside your BPM to gather the appropriate data, setting it locally to a variable, and passing that variable into your email. Did you try something like that?

Thanks Aaron,
No I haven’t tried this. I think it’s a solid idea! But I am not sure what table/method would be the best to implement it on. I tried using the “GetNewOrderHedAttch” method on the Sales Order BO, but the ttTables didn’t pass any of the desired information through.

So once I’m using the right BO, I’d start with the Fill table by query to gather the data, set argument/variable, and then send the email with the variables gathered from the query? Not sure if that accurately matches the route you were describing.

You already have DD so inside the Data Directive do a lookup in OrderHed , Customer , Etc to properly craft your email.

1 Like