Skip to main content

Hi,

I hope you're doing well.

I'm working on creating a custom event in IFS9 to send an email notification when a purchase order is received.

I'm using PL/SQL code for this, but I've encountered a challenge. Currently, the system sends an email for each line item, while the user would prefer a single email for the entire order and receipt. I'm having some difficulty with this because, even though I can include all the received lines in the email, it still sends multiple emails, matching the number of lines received.

I'm working with the LU: PurchaseReceipt and the table: PURCHASE_RECEIPT_TAB.

If you have any suggestions or guidance on how to approach this, I would greatly appreciate it.

Thank you in advance for your help!

You basically can’t do this because Purchase Receipt Tab is already keyed to Purchase Lines, so your event will trigger for every line receipted.

 

Theoretically, you could make your PLSQL block check the entire Purchase Order Lines status are receipted and abort if they’ve not all been (or some other logic that your business would define), but you might possibly run into mutating table issues.

 

I’ve worked around this before by instead creating a scheduled task rather than an event that runs pretty often and checks for situation now needs to be sent, and sends it, but then this also probably requires storing the fact you’ve communicated the email in a custom field or custom lu somewhere to avoid the email retriggering everytime the scheduled task runs.

 

 


Reply