开发者

Go To Main Table form menu is not coming in reference field while creating transfer order

I created a purchase order from sales order line with 5 quantity. In my salesline form under Other tab I have Reference Number Fie开发者_如何学编程ld. When I right clicked on that field it will show menu like "Go to Main Table Form".

But when I created a transfer order from sales order line with 5 quantity. In my salesline form under Other tab I have Reference Number Field. When I right clicked on that field it will not show menu like "Go to Main Table Form".

What to do to show "Go to Main Table Form" that menu in transfer order.


Go to the Main Table Form will only show up for Reference number when the Reference type is Sales order, Purchase order, or Production. If Reference type is blank or something else, Go to the Main Table Form won't show up.


I think you should be able to "Go to Main Table Form" for transfer orders if you create method \Forms\SalesTable\Data Sources\SalesLine\Fields\InventRefId\Methods\jumpRef, something like:

public void jumpRef()
{
    Args        args;
    FormRun     fr;
    ;

    if (salesLine.InventRefType == InventRefType::InventTransfer)
    {
        args = new Args(formstr(InventJournalTable));
        args.lookupField(fieldNum(InventJournalTable, JournalId));
        args.lookupValue(salesLine.InventRefId);

        fr = ClassFactory.FormRunClass(args);
        fr.init();
        fr.run();
        fr.detach();
    }
    else
    {
        super();
    }
}

I haven't checked if it works, and you'd probably need to modify the InventJournalTable form anyway because by default it shows only open journals but I hope this sample code helps to understand how to create custom "Go to the Main Table Form" behaviour.

P.S. To think of it, to better control user permissions maybe it would make sense to use MenuFunction and its create method instead of the provided code though it might not be critical in your scenario.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜