Catch sales order process button click  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Catch sales order process button click

Postby indikad » Wed Sep 07, 2016 5:50 pm

I need to catch the sales order process button click ( on sale order form )
I need to catch this before Jiwa does....
The "SalesOrder.ProcessingStart" wont work for me on this case
For example when a order is a reserve order - if users clicks the process button, Jiwa will prompt the users
"Cannot process an order or a reserve order ..."

(this message occurs before the ProcessingStart and never reaches ProcessingStart )

any help is appreciated.
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Catch sales order process button click  Topic is solved

Postby Mike.Sheen » Thu Sep 08, 2016 8:03 pm

indikad wrote:I need to catch the sales order process button click ( on sale order form )
I need to catch this before Jiwa does....


Hi Indika,

You need to add a handler to the toolclick event within the SetupBeforeHandlers method to get in before Jiwa does.

We ship with a standard plugin which does a similar thing - it's called "Sales Order Custom Email" - take a look at that code.

NOTE: You'll see we throw a JiwaFinancials.Jiwa.JiwaApplication.Exceptions.ClientCancelledException in our handler of the toolclick - that instructs Jiwa to abort silently - you want to do that only if you don't want Jiwa to receive the toolclick event after your handler - if you still want Jiwa to process as per normal after your hander, then don't throw that exception.

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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests