ReApply Quantities button in Sales Orders Utilities Tab  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

ReApply Quantities button in Sales Orders Utilities Tab

Postby Ernst » Tue Feb 16, 2021 8:02 am

In JIWA721,
My customer uses this button a lot and asked if it could be moved to the Main Tab. I thought I could just adjust the plugin.
But it looks like this is a JIWA system created button. Is there an easy way to move it to the main Tab?
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: ReApply Quantities button in Sales Orders Utilities Tab

Postby SBarnes » Tue Feb 16, 2021 9:32 am

Hi Ernst

The short answer is although I've never tried it you should be able to do it the following code for example will give you the group the button is in


Code: Select all
         soForm = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
         Infragistics.Win.UltraWinToolbars.RibbonGroup utillinks = soForm.UltraToolbarsManager1.Ribbon.Tabs["Utilities"].Groups["Links"];


Once you have the group there is a tools collection which has an AddTool method and Remove method to get the tool/button you can use the indexer like this

Code: Select all
utillinks.Tools["Name of tool usually caption on button"]


Basically you would need to grab both ribbon groups (from and to) and remove it from the first group and then add it to the second, the remove may not be necessary as the tool goes in UltraToolbarsManager1.Tools first so just adding it to the group you want it in may just move it.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1618
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: ReApply Quantities button in Sales Orders Utilities Tab  Topic is solved

Postby Mike.Sheen » Tue Feb 16, 2021 1:08 pm

Yep, it is a built-in ribbon tool. As Stuart says, you can add the same tool to another group within a tab, or even move it.

To add the same tool to the Actions group of the Main tab:

Code: Select all
Dim group As Infragistics.Win.UltraWinToolbars.RibbonGroup = UltraToolbarsManager1.Ribbon.Tabs("Main").Groups("Actions")
group.Tools.AddTool("ID_RecordUtilitiesReApplyQuantities")
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: ReApply Quantities button in Sales Orders Utilities Tab

Postby Ernst » Tue Feb 16, 2021 3:19 pm

OK Have tried that see attached plugin. Old one wont remove. But that probably OK. New one, wont point to old one.

If I could just call the "Reapply Quantities" but does not seem to be an action?
Attachments
Plugin Sales Order Custom Buttons_ForumTest.xml
(36.19 KiB) Downloaded 20 times
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: ReApply Quantities button in Sales Orders Utilities Tab

Postby Ernst » Tue Feb 16, 2021 3:24 pm

OK have just seen mike's reply.. That worked perfectly.. Thanks Mike...;)
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12


Return to Technical and or Programming

Who is online

Users browsing this forum: MoniHolliday and 2 guests

cron