Skip to main content
Answer

How can I get the records from a data view that are display on a grid without reselecting the records?

  • January 27, 2023
  • 3 replies
  • 445 views

darylbowman
Captain II
Forum|alt.badge.img+15

I’m dealing with a situation on Invoices and Memos entry screen where the Applications tab data is generated from an action, which means that the View.Select() does not return the data. How can I see the records without using View.Select()

Best answer by darylbowman

@Naveen Boga - View.Cache.Cached did not seem to be at all reliable.

@aaghaei - I needed to update a record rather than get the changed record.

I found Base.Adjustments.Select() DOES return the records after they had been loaded with Base.loadDocuments.Press(); 

 

I don’t quite understand what the .Select() method does, as I thought it re-selects from the database, but apparently not.

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • January 30, 2023

Hi @darylbowman  Have you checked with View.Cache.Cached() ?


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • January 30, 2023

I’m not sure what objective you have but if you want to get the modified record from Cache, in addition to what Naveen suggested, you might want to try Locate method something like

ARRegister cached = (ARRegister)Base.ARDocument.Cache.Locate(ardoc);

This will get the modified record for the ardoc 

 


darylbowman
Captain II
Forum|alt.badge.img+15
  • Author
  • Answer
  • January 30, 2023

@Naveen Boga - View.Cache.Cached did not seem to be at all reliable.

@aaghaei - I needed to update a record rather than get the changed record.

I found Base.Adjustments.Select() DOES return the records after they had been loaded with Base.loadDocuments.Press(); 

 

I don’t quite understand what the .Select() method does, as I thought it re-selects from the database, but apparently not.