hello everyone i'm trying to controle a button that i added in SalesEditLine.
if i open SalesEditLine from the pro forma invoice button in sales orders, i want it to be disabled.
if i opened it from the Sales Update button in SalesPostingHistory i want it to be disabled.
to do so i tried to use args.caller() but the caller is SalesFormLetter in both cases so it didn't work.
i tried to pass a parameter in the clicked method of the button so i can use it in the init method of SalesEditLine form this is the code.
[Control(/Button/)] class ButtonUpdate { void clicked() { Args args; super(); str test = 'test'; args = new Args(); args.record(salesParmTable); args.parmEnum(enum2int(DocumentStatus::Invoice)); args.name(formstr(SalesEditLines)); args.parm(test); SalesFormLetter::main(args); salesParmTable_ds.active(); } }
but i get this error.
any solution to this error or any other solution for the problem.
thank you for help.