Sunday, November 11, 2012

Adding the View details link


1. Open the LedgerJournalTable form in the AOT, expand its data sources, and override jumpRef() of the Name field on the LedgerJournalTable data source with the following code:

public void jumpRef()
{
    LedgerJournalName name;
    Args args;
    MenuFunction mf;
    name = LedgerJournalName::find(
    LedgerJournalTable.JournalName);
 
    if (!name)
    {
        return;
    }
    args = new Args();
    args.caller(element);
    args.record(name);
    mf = new MenuFunction(menuitemDisplayStr(LedgerJournalSetup), MenuItemType::Display);
    mf.run(args);
}

2. Go to General ledger | Journals | General journal, select any of the existing records,
and right-click on the Description column. Notice that the View details option, which
will open the Journal names form, is now available:


No comments: