“Go to the Main Table Form” differences between Axapta 2.x and Dynamics AX 4

來源:互聯網
上載者:User
"Go
to the Main Table Form" differences between Axapta 2.x and Dynamics AX
4 Good morning, The "Go To Main Table Form" functionality in Axapta used to filter on the
child form for the calling record, as well as update as the parent form changed
record. In AX 4 that is no longer the case, though child forms opened through
menuitem buttons do still behave this way. What happens is that in AX 4, the
calling record is no longer passed in args.record() (therefore, linkActive() is
no longer triggered on the child datasource); the args members lookupField() and
lookupValue() are populated instead with the calling control's
information. If for some reason you want to get back to the jumpref() behavior of Axapta
2.x, add the following code to the SysSetupFormRun class new() method. You may
want to create a per-user parameter to enable/disable this feature: void new(Args args)
{
    (...)
    SysSetupFormRun
formRun;
    ;     if (!args.record() && args.lookupField()
        &&
SysUserInfo::find().MyNewJumpRef2xNoYesParameter
        &&
SysDictClass::is(args.caller(), classnum(SysSetupFormRun)))
    {
       
formRun = args.caller();
        if (formRun.objectSet() &&
formRun.objectSet().cursor())
        {
           
args.record(formRun.objectSet().cursor());
        }
    }
        super(args);
    (...)
} Note: See SysFormRun::isCalledFromJumpRef(_args, _field) for example Note2: This implementation is very flawed and doesn't work on records that
contain two or more fields with similar relationships (such as the Ledger
Accounts on Item Groups). This should instead be coded by adding a
QueryBuildDynalink linking the parent and child forms together through the
related fields. I leave the details up to the reader.
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.