Calling method on a caller form
I created a form LedgerJournalTransDaily(For example) with method callerMenuItemName() and form LedgerJournalTableIPM(For example), i want to call method callerMenuItemName() in in form LedgerJournalTableIPM(For example).
Solution:
LedgerJournalTableIPM(For example)
Public MenuItemName callerMenuItemName()
LedgerJournalTransDaily(For example) method:
Solution:
LedgerJournalTableIPM(For example)
{
return element.args().menuItemName();
}
LedgerJournalTransDaily(For example) method:
[FormEventHandler(formStr(LedgerJournalTransDaily), FormEventType::Initialized)]
public static void LedgerJournalTransDaily_OnInitialized(xFormRun sender, FormEventArgs e)
{
if(sender.args().caller().callerMenuItemName() == menuItemDisplayStr(LedgerJournalTableIPM))
{
// Your logic....
}
}
Comments
Post a Comment