Page 1 of 1

ReApply Quantities button in Sales Orders Utilities Tab

PostPosted: Tue Feb 16, 2021 8:02 am
by Ernst
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?

Re: ReApply Quantities button in Sales Orders Utilities Tab

PostPosted: Tue Feb 16, 2021 9:32 am
by SBarnes
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.

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

PostPosted: Tue Feb 16, 2021 1:08 pm
by Mike.Sheen
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")

Re: ReApply Quantities button in Sales Orders Utilities Tab

PostPosted: Tue Feb 16, 2021 3:19 pm
by Ernst
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?

Re: ReApply Quantities button in Sales Orders Utilities Tab

PostPosted: Tue Feb 16, 2021 3:24 pm
by Ernst
OK have just seen mike's reply.. That worked perfectly.. Thanks Mike...;)