Skip to main content
Answer

Get latest value from the Database

  • May 6, 2025
  • 1 reply
  • 66 views

How to get the latest value from the Database.

I have created a Database where the record is always updating. So I always want to get the latest record.

 

Clearing Cache is not working

Base.Document.Cache.Clear();
Base.Document.Cache.ClearQueryCache();

e.Cache.Clear();
e.Cache.ClearQueryCache();

 

using PXSelect is alway providing  the Cached Value

 

 

 PXSelect<TableName,
                                                           Where<TableName.bAccountID, Equal<Required<TableName.bAccountID>>,
                                                                And<TableName.inventoryID, Equal<Required<TableName.inventoryID>>,
                                                                And<TableName.startDate, LessEqual<Required<TableName.startDate>>,
                                                                And<TableName.endDate, GreaterEqual<Required<TableName.endDate>>
                                                               >>>>>.Select(e.Cache.Graph, new object[] { row.CustomerID, row.InventoryID, Today, Today });
               

Best answer by Rakshanda

Hi ​@anupusefulbi ,

you can try by using PXReadOnly instead of PXSelect 

you will get details from database

hope above helps!!

1 reply

Forum|alt.badge.img+1
  • Jr Varsity II
  • Answer
  • May 6, 2025

Hi ​@anupusefulbi ,

you can try by using PXReadOnly instead of PXSelect 

you will get details from database

hope above helps!!