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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Refreshing Page with Query causes The requested record cannot be located message

(2) ShareShare
ReportReport
Posted on by 157
Hi There,
 
I have a Query to get list of Project lines . To display it , i am using a temporary table and populate that on OnOpenPage() (using the example here https://yzhums.com/4869/)
 
I have written some actions on that page, once it is done, I am manually refreshing the page to see the changes . But the page always shows "The requested record cannot be located" if i refresh or F5
 
Please note I am not using any filters on OnOpenPage while my query object only has some filters . I am not able to find what's going wrong. Is it not possible to refresh the page with temporary table ?
 
kindly help!
 
 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,348 Super User 2025 Season 2 on at
    Refreshing Page with Query causes The requested record cannot be located message
    Hi @Dej,
     
    I hope this can help you and give you some hints.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,307 Super User 2025 Season 2 on at
  • Suggested answer
    Alexander Drogin Profile Picture
    262 on at
    Refreshing Page with Query causes The requested record cannot be located message
    It would be easier to answer your question if you could share your code. This error usually means that the record displayed in the page has been deleted.
    By your description, I can only guess that some code deletes the source record from the temporary table, and since the refresh action does not invoke the OnOpenPage trigger, this record cannot be found anymore.
  • Suggested answer
    YUN ZHU Profile Picture
    93,151 Super User 2025 Season 2 on at
    Refreshing Page with Query causes The requested record cannot be located message
    Hi, I retried my code and did not encounter your problem. This is the version I tested
    Version: W1 25.2 (Platform 25.2.28691.0 + Application 25.2.27733.28869)
     
    Hope this helps.
    Thanks.
    ZHU
  • Verified answer
    Dej Profile Picture
    157 on at
    Refreshing Page with Query causes The requested record cannot be located message
    Hi All,
    Thank you for the responses. I found the issue!
    The page first loads without any issues, It shows that msg only if refresh the browser
     

       if Qry.Open() then begin
                while Qry.Read() do begin
                    Rec.init();
                    Rec.RowNo := Rec.RowNo + 1;
     
    This line Rec.RowNo:= Rec.RowNo +1
    The Rec.RowNo is not set when i refresh the page...What’s strange here is that Rec.RowNo is available the first time the page loads, but it stops working after the page is refreshed.

    I tried to give InitValue=0 in the temp table field, it is not working. So i initialized a int variable, increment it and assign it to RowNo field.
    now the page reloads correctly.

    But I want to have a Refresh action , to show the status changes in the repeater control
     CurrPage.Update()
    the repeater doesn't refresh, can anyone kindly let me know what is wrong with CurrPage.Update() for refreshing the repeater?
     
    Thank you for helping!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,750

#2
Sumit Singh Profile Picture

Sumit Singh 2,689

#3
YUN ZHU Profile Picture

YUN ZHU 1,987 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans