Solved

refresh value from the database to reflect on the UI

  • 16 August 2023
  • 3 replies
  • 145 views

Userlevel 4
Badge

Hello every one,

I have done a payment integration on AcuPos. when the payment is processed succefully, the provider send back a payment reference.
I have configured the payment reference to be pushed to the database directly upon being receive.
Now, the user have to refresh the browser tab for the reference to reflect from the database to the UI.
see below;
 

is there a way I can refresh the specific field or the column or the tab so that the database value can reflect on the user interface without the user having to refresh the entire tab.

Kindly assist.

any kind of response will be appreciated.

Thank you, great community!

icon

Best answer by Michael Ndungi 17 August 2023, 09:01

View original

3 replies

Userlevel 7
Badge +4

@Michael Ndungi, You can try RequestRefresh of the view after persisting the value in the database and see if that helps. 

For more details on it kindly refer, 

Good Luck.!

Userlevel 4
Badge

@Michael Ndungi, You can try RequestRefresh of the view after persisting the value in the database and see if that helps. 

For more details on it kindly refer, 

Good Luck.!

Thanks

I did it this way and it worked.



 


public PXAction<IGFS.DAC.IGFSQuickOrder> Refresh;

[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "Refresh", Enabled = true, MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
protected virtual void refresh()
{
// Ensure that the base graph instance is available
if (Base != null)
{


// Clear and refresh the view
Base.CurrentDocument.Cache.Clear();
Base.CurrentDocument.Cache.ClearQueryCache();
Base.CurrentDocument.View.RequestRefresh();
}
}

 


 

Userlevel 7
Badge

Thank you for sharing your solution with the community @Michael Ndungi!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved