Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans