Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ExtensionOf(formStr(CustInvoiceJournal))]
- final class GoCustInvoiceJourForm_Extension
- {
- public const int listCreateRoot = 1;
- public void init()
- {
- next init();
- FormGridControl invoiceIDControl = this.control(this.controlid("CustInvoiceJour_InvoiceNum_Grid"));
- if(invoiceIDControl)
- {
- this.controlMethodOverload(true);
- this.controlMethodOverloadObject(this);
- invoiceIDControl.registerOverrideMethod(methodstr(FormGridControl, selectedMenuOption),
- formMethodStr(CustInvoiceJournal, selectedMenuOptionNew));
- invoiceIDControl.registerOverrideMethod(methodStr(FormGridControl, getContextMenuOptions),
- formMethodStr(CustInvoiceJournal, getContextMenuOptionsNew));
- }
- }
- public str getContextMenuOptionsNew(FormStringControl _control)
- {
- ContextMenu menu = new ContextMenu();
- List menuOptions = new List(Types::Class);
- info("I'm in");
- ContextMenuOption contextMenu_changeID = ContextMenuOption::Create('testas', listCreateRoot);
- menuOptions.addEnd(contextMenu_changeID);
- menu.ContextMenuOptions(menuOptions);
- _control.getContextMenuOptions();
- return menu.Serialize();
- }
- /// <summary>
- /// Define new override on the control for processing the user selection
- /// </summary>
- public void selectedMenuOptionNew(int selectedOption, FormStringControl _control)
- {
- switch (selectedOption)
- {
- case -1:
- break;
- case listCreateRoot:
- info('testas');
- break;
- default:
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement