Call other form/ Class with Button Click
[FormControlEventHandler(formControlStr(LedgerJournalTransCustPaym, CustInRemitance), FormControlEventType::Clicked)]
public static void CustInRemitance_OnClicked(FormControl sender, FormControlEventArgs e)
{
FormDatasource fds;
MenuFunction menuFunction;
LedgerJournalTrans ljt;
Args args = new Args();
fds = sender.formRun().datasource('LedgerJournalTrans');
ljt = fds.cursor();
args.parm(ljt.JournalNum);
menuFunction = new MenuFunction(menuItemActionStr(CITCustPaymImport),
MenuItemType::Action);
if (menuFunction.hasRunPermissions(args))
{
menuFunction.run(args);
}
}
[FormControlEventHandler(formControlStr(LedgerJournalTransCustPaym, CustInRemitance), FormControlEventType::Clicked)]
public static void CustInRemitance_OnClicked(FormControl sender, FormControlEventArgs e)
{
FormDatasource fds;
MenuFunction menuFunction;
LedgerJournalTrans ljt;
Args args = new Args();
fds = sender.formRun().datasource('LedgerJournalTrans');
ljt = fds.cursor();
args.parm(ljt.JournalNum);
menuFunction = new MenuFunction(menuItemActionStr(CITCustPaymImport),
MenuItemType::Action);
if (menuFunction.hasRunPermissions(args))
{
menuFunction.run(args);
}
}
No comments:
Post a Comment