Business logic wont fire  Topic is solved

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

Business logic wont fire

Postby Riyaz » Mon Sep 12, 2016 2:06 pm

Hi there

We are building up a plugin which creates a CSV export, its written inside the Business logic section and is supposed to trigger on sales order processed, but it wont, also tried having a message box in it. Kindly advise on what am doing wrong here. Have attached the plugin
Attachments
Plugin Export 2 CSV.xml
(33.74 KiB) Downloaded 261 times
Riyaz
Kohai
Kohai
 
Posts: 254
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: Business logic wont fire  Topic is solved

Postby Mike.Sheen » Mon Sep 12, 2016 7:50 pm

Hi Riyaz,

You can simply add the business logic to the tab of the plugin (add "Sales Order Entry"), then your plugin will work.

However, as you're wanting to show a dialog, you shouldn't be using the BusinessLogicPlugin class to hook the business logic - it might be invoked from a service, so you don't want to ask for user interaction.

Instead, add your handler in the Setup method of the FormPlugin class - it'll invoke when the sales order is processed, but only from the sales order form - not another invocation such as a service. Attached is a modified version of your plugin showing this.

Mike
Attachments
Plugin Export 2 CSV - V2.xml
Modified plugin
(36.48 KiB) Downloaded 309 times
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 4 guests

cron