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 :
Finance | Project Operations, Human Resources, ...
Answered

Form datasource cursor resetting to first record on refresh

(0) ShareShare
ReportReport
Posted on by

I have a requirement where I have to display CostCenter from financial dimensions from purchase order header on the grid of "All purchase orders" and it must be filterable.

For this I made a custom view to get CostCenter for each purchase order and added it as a datasource on the form (PurchTable) with Inner Join with table (PurchTable). It worked as expected except one issue that the cursor goes back to the last record on refreshing the form.

The form itself works fine if I remove my custom data source. So, as per my findings View as a datasource is causing the cursor to reset to the last record on refresh but I don't know why its happening and how to fix this. 

Any help is appreciated.

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
  • m.kamal Profile Picture
    on at

    Hi, thanks for the links. I found the following solution from there and it works.

    public void executeQuery()
    {
        PurchTable purchTable = this.cursor();
        RecId purchRecId = purchTable.RecId;
    
        next executeQuery();
    
        if (purchRecId)
        {
            purchTable = PurchTable::findRecId(purchRecId);
            this.positionToRecord(purchTable);
        }
    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 386

#3
Adis Profile Picture

Adis 259 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans