Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Form cursor position is changed to start position defined in the data source

Posted on by 4,624

In a customized form, when the form refreshed by pressing F5 or Refresh button in the Action pane list group. The cursor position is changed into start position which we defined in the form data source.

In standard form, Sales table, when the form is changed into grid view and if we refresh, the cursor stays in the current record. 

Where does the code require to make the cursor stay in the selected record even after a refresh.

*This post is locked for comments

  • udaY-ch Profile Picture
    udaY-ch 4,624 on at
    RE: Form cursor position is changed to start position defined in the data source

    Hi Vilmos,

    Thanks for your reply, I do use execute query and by pressing F5, debugger comes to executequery after SysSetupFormRunTask. [research code wasn't used]

    The issue got fixed when I change the link type of the form's second datasource from outerjoin to innerjoin.

    But I wonder how come the standard form |SalesTable| has multiple data sources with outer join as link types for all its joining data sources.

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Form cursor position is changed to start position defined in the data source

    Either your customized code is calling research, or executequery, or a joined datasource is triggering the move of the cursor.

    If you do a research in code, you may pass in (true) as a parameter to retain cursor position.

    You could try overriding executeQuery on the datasource, put a breakpoint in there and see what is triggering the reread of the datasource (which causes the cursor to reposition to first, or last entry depending on the property setting).

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans