Reputation: 197
I am trying to get the journal number (Red box) from the invoice journal. I have a button inside the Lines (blue box), however in order for it to work I need the Journal Number (red box) when I clicked the Lines (blue box).
Upvotes: 0
Views: 429
Reputation: 2281
Your Line form already have variable journalNum
So on your Lines form create parm method like this
public LedgerJournalId parmJournalNum(LedgerJournalId _journalNum = journalNum)
{
journalNum = _journalNum;
return journalNum;
}
And then in main method of your batch class you can get journal number using the following code
if (classIdGet(args.caller()) == classNum(SysSetupFormRun))
{
if (formHasMethod(args.caller(), identifierStr(parmJournalNum)))
{
journalNum = args.caller().parmJournalNum();
}
}
Upvotes: 1