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.
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); } }
Hi, Please check these threads and see if it helps you
community.dynamics.com/.../if-i-refresh-form-its-move-to-grid-last-records-only
André Arnaud de Cal...
292,160
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156