Skip to main content
Question

Is there an event for the change of the masterview.current


priekenberg40
Varsity I
Forum|alt.badge.img

I have a screen with an masterview and some virtual DACs which are filled by data got from API requests. Now i need to be informed of the change of the masterviews current record to refresh the virtual DACs. Is there an event i can use for this purpose?

7 replies

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

I believe RowSelected of the masterview DAC would serve this purpose.


priekenberg40
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • 39 replies
  • November 15, 2023

@darylbowman sadly not. It’s triggered for every record in the DAC.


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1179 replies
  • November 15, 2023

@priekenberg40 I couldn’t underestand your question very well but if you are updating any given record either from API, manually, Import Scenario, … it will result in trigeering RowUpdated event and current record in cache will be the updated record. So if this is the case then on your MasterView RowUpdated you can refresh the virtual views using [Base. if needed]YourVirtualView.View.RequestRefresh();

If your case has different requirement please explain further.


priekenberg40
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • 39 replies
  • November 15, 2023

@aaghaei i have a masterview DAC with basic information and dependant data fetched by API which are stored in virual DACs which are shown in different Tabs. If i now switch my masterview by using the navigatin buttons on the top i have to refetch the API data. But sometimes masterview.current is set to the wrong record.


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1179 replies
  • November 15, 2023

@priekenberg40 If you want to refresh dependent views even if masterview is not modified then your only option is to use RowSelected as @darylbowman mentioned. Also if you have defined your keys correctly and defined the parent-child relationship in the views and enabled the SuncPosition in UI, even without ReuestRefresh your dependent data will be refreshed. Without your custom code review I am not sure if people in communinty can be more helpful.


priekenberg40
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • 39 replies
  • November 15, 2023

@aaghaei If i change the tabs on the UI a refresh of the virtual DAC is done but as masterview.current points to a wrong record this will fetch the wrong data. My code has no chance to know which is the current masterview record wich is presented to the user.
If i find some time, i’ll prepare a minimal custo.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2658 replies
  • December 14, 2023

Hi @priekenberg40 were you able to find a solution? Thank you!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings