Warehouse Transfer Activated event  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Warehouse Transfer Activated event

Postby DannyC » Wed May 20, 2020 10:11 pm

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
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Warehouse Transfer Activated event  Topic is solved

Postby Mike.Sheen » Wed May 20, 2020 10:18 pm

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
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Warehouse Transfer Activated event

Postby DannyC » Thu May 21, 2020 12:54 am

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
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron