Sales Order Line Changed in the Sales Order Screen  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Sales Order Line Changed in the Sales Order Screen

Postby SBarnes » Thu Jul 06, 2017 3:17 pm

Is there an easy way to detect that a line in a sales order has been changed by the User Interface and not plugin code?

I know the event on the sales order of the form has SalesOrderLineChanged but is there a way of only detecting the event from the user and not possibly being caused by plugin code as well?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Sales Order Line Changed in the Sales Order Screen

Postby Mike.Sheen » Sun Jul 16, 2017 12:43 pm

Only way to do that is add a handler for the grid change event and set a flag in a try finally block, and in the finally clear the flag (or better yet restore the flag to the value before).

Then in your code elsewhere you'd need to check the value of that flag to determine if the change originated from the user.
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: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Sales Order Line Changed in the Sales Order Screen  Topic is solved

Postby SBarnes » Sun Jul 16, 2017 7:56 pm

Hi Mike,

I followed a similar logic and used a Boolean that set at the start of the processing code to bail out of the event firing code and only have it fire if the Boolean is set to false.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 16 guests

cron