Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Add jumpRef() for datasource fields as extension

Posted on by 142

Hi,

I would like to add jumpRef method for fields in the data source in form without overlayering. But this field does not have overridden jumpRef in code therefore trick with registerOverrideMethod does not work: it is ignored by the system.

Maybe, somebody has any advice.

*This post is locked for comments

  • Hidden developer Profile Picture
    Hidden developer 142 on at
    RE: Add jumpRef() for datasource fields as extension

    Yes, I has tried, but it does not help.

    I suppose that after initialization of datasource all objects from form have been drawn therefore it can not change its behavior when jumpRef was not defined previously.

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Add jumpRef() for datasource fields as extension

    Hi Hidden developer,

    This code should work. Did you try to build package with dependencies ?

  • Hidden developer Profile Picture
    Hidden developer 142 on at
    RE: Add jumpRef() for datasource fields as extension

    Excuse me for names of objects (they are for studying). My code looks like this:

    [FormDataSourceEventHandler(formDataSourceStr(Form1, Table2), FormDataSourceEventType::Initialized)]

      public static void Table2_OnInitialized(FormDataSource sender, FormDataSourceEventArgs e)

      {

          var overrides = Form1ExtensionOverrides::construct();

          sender.object(fieldNum(Table2, FieldString2)).registerOverrideMethod(methodStr(FormDataObject, jumpRef),

              methodStr(Form1ExtensionOverrides, _OnJumpRef), overrides);

      }

  • Hidden developer Profile Picture
    Hidden developer 142 on at
    RE: Add jumpRef() for datasource fields as extension

    The issues appeares, when jumpRef is not defined for field and I try to override it.

  • Basheer17 Profile Picture
    Basheer17 2,720 on at
    RE: Extension form

    Even if the jumpRef hasn't been overridden registerOverrideMethod should work. You might have overlooked something. If possible share the code where registerOverrideMethod  is implemented.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans