Skip to main content

Hello,

in IFS10APPS

I have created custom event to release every purchase order just after saving. 

 

Than, when I save new purchase order, nothing happens. The purchase order 433184 is still in “Planned” state. No errors of the event, nothing. 

 

What is wrong with it? Where should I look for error?

 

Thanks in advance 

Jan

Hi @westjan 

 

Event you made is triggers when a new Purchase order is created. Since the event runs within the same transaction as creating the record, the select does not ‘see’ the record since the transaction is still not committed.

To avoid that, you can run your code as a background job, which would run after the roder is created.

 

Check this post for more details on running a code block as a background job

How to create a defered job to execute .modify__() ? | IFS Community

Also this blog post will help (Check 2. Use Background Processing section)

Tips to avoid mutating table error in IFS event actions – DSJ's Blog (dsj23.me)

 

Hope it helps!

Damith


Hi @westjan,

Please proceed with Damith’s suggestion if you want to Release Purchase Order with PO header creation only else you can configure your event at Purchase Order Line instead.

 

System getting null values for Objid and Objversion with your select statement.

You can use below sql statement at PO line level.

 

 

Regards

Abdul Rehman


Reply