How to detect an event of "unlock order"

Questions about and code samples for automation process code snippets within Select.
Post Reply
tamar
Posts: 9
Joined: Wed Dec 14, 2022 4:52 pm

How to detect an event of "unlock order"

Post by tamar »

The select's behavior is: order cannot be used by 2 users in parallel,
User cannot open an order while it used by another user.
I want to invoke some code each time an order is closed and can be used.
Can I detect this event?
Thanks in advance!
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: How to detect an event of "unlock order"

Post by BobRichards »

You only need to open the order as read-only
If you want to use a server package, it can register for the "OrderClosed" notification and receive a callback for each event. This notification occurs when the user has closed the order - but the order may not be available for write access yet.

You want to know when an order has been closed and (might) be available for write access
Use the "LockReleased" notification. Be aware that a race condition will exist by using this notification since another user may open the order between the time the notification is fired and your handler attempts to open the order.
Bob Richards, Senior Software Developer, SoftPro
Post Reply