web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Add jumpRef() for datasource fields as extension

(0) ShareShare
ReportReport
Posted on by 144

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

  • Basheer17 Profile Picture
    2,720 on at

    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.

  • Hidden developer Profile Picture
    144 on at

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

  • Hidden developer Profile Picture
    144 on at

    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);

      }

  • Mea_ Profile Picture
    60,286 on at

    Hi Hidden developer,

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

  • Hidden developer Profile Picture
    144 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans