Page 1 of 1

Warehouse Transfer Activated event

PostPosted: Wed May 20, 2020 10:11 pm
by DannyC
I need to write a plugin to do some stuff after a warehouse Transfer In has been activated.

I can't find an event in the business logic, nor on the form object for me to hook into.

How could I do it?
v 7.2.1

Cheers
Danny

Re: Warehouse Transfer Activated event  Topic is solved

PostPosted: Wed May 20, 2020 10:18 pm
by Mike.Sheen
DannyC wrote:I need to write a plugin to do some stuff after a warehouse Transfer In has been activated.

I can't find an event in the business logic, nor on the form object for me to hook into.

How could I do it?
v 7.2.1

Cheers
Danny


Hi Danny,

What you can do is in the SaveStart, SaveEnding or SaveEnd event look at the Activated and OriginalActivated properties and if OriginalActivated is True, but Activated is False, then you know the save is being performed as a result of activation.

Please remember - if you plan on presenting a message to the user they would need to dismiss (such as a messagebox) then you don't want to do that in the SaveEnding event handler - otherwise it may block other users from various actions until the user dismisses the UI prompt.

Mike

Re: Warehouse Transfer Activated event

PostPosted: Thu May 21, 2020 12:54 am
by DannyC
Nice tip, thanks Mike.
What I found is that the Activated and OriginalActivated both need to be True. But using your logic on the SaveEnd and checking those flags I was able to work out what I needed.

Cheers