PO - Form Email Before Event and Print Event

Discussions relating to plugin development, and the Jiwa API.

PO - Form Email Before Event and Print Event

Postby Riyaz » Wed Jun 24, 2020 8:18 pm

Hi There

Am trying to find the below respective events of Jiwa 6 in Jiwa 7, can you pls advise.

Purchase Order - Email Before

Purchase Order - Print Event
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: PO - Form Email Before Event and Print Event

Postby SBarnes » Thu Jun 25, 2020 9:15 am

If you want get at when the user clicks on the tool bar on the form there will be UltraToolbarsManager1 attach to its click event with a signature like

Code: Select all
private void UltraToolbarsManager1_ToolClick(object sender, ToolClickEventArgs e)


e.Tool.Key will contain a string you would then be looking for ID_RecordEmail and ID_RecordPrint to tell when the correct buttons are pressed

If you actually need the before an event attach a similar handler in the form plugin Set Before and your event will fire before Jiwa's
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: PO - Form Email Before Event and Print Event

Postby Riyaz » Thu Jun 25, 2020 2:02 pm

Thanks Stuart
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: PO - Form Email Before Event and Print Event

Postby Riyaz » Mon Jun 29, 2020 3:08 pm

Hi Stuart

It works fine for buttons like Cancel, Copy, etc but for Email button it wont, am guessing the Jiwa Event fires before that, do you have any example for the Set Before?
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: PO - Form Email Before Event and Print Event

Postby SBarnes » Mon Jun 29, 2020 3:12 pm

Hi Riyaz

The set before is exactly the same as the code you put in the Setup function except you put it in the SetUpBefore, what this means is you event code will fire before Jiwa does anything, if you want to find out what string is for the email just use a message box for e.Tool.Key as its a string, click on the email button and see what you get.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: PO - Form Email Before Event and Print Event

Postby Riyaz » Mon Jun 29, 2020 3:19 pm

Hi Stuart

Thanks for the quick reply, Its already under SetupBeforeHandlers, but it works for other buttons except this Email button Purchase Order
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: PO - Form Email Before Event and Print Event

Postby SBarnes » Mon Jun 29, 2020 7:26 pm

See the atttached plugin for help
Attachments
Plugin po test.xml
Po test
(33.92 KiB) Downloaded 49 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: PO - Form Email Before Event and Print Event

Postby Riyaz » Tue Jun 30, 2020 12:22 pm

Hi Stuart

Thanks very much, appreciate the help. Weird thing is that I had exactly the same code as yours, but it wont work for me, if I disable mine and use yours as is, it works. Thanks anyway.
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: PO - Form Email Before Event and Print Event

Postby SBarnes » Tue Jun 30, 2020 12:23 pm

Make sure you have a reference to the purchase order form under the forms tab.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: PO - Form Email Before Event and Print Event

Postby Riyaz » Tue Jun 30, 2020 12:26 pm

I do, it only wont work for Email button, but works for others, such as Copy button. Anyways, its ok for now, thanks anyway, really appreciate it.
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Next

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 5 guests

cron