Override Form_OnLoad In Dashboard 24.1.10

Hey,

I’ve seen where I can override the form onload event. I’m in a dashboard where the on load event fires that dang slider and I want it to stop.

So, I added this event to override the form onload event, but it’s not firing. The slider is still showing up, and the dialog show I put in the slider-open slot isn’t firing.

Reckon what I missed?

Thanks,

Joe

With the override event set as above, I get this in the debug:

main.f970e717b4861fde.js:160 view loaded Ice.UIDbd.TeamLeaderAssembly
18[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
5[Violation] 'requestAnimationFrame' handler took <N>ms
main.f970e717b4861fde.js:160 application initialized
main.f970e717b4861fde.js:160 event: Form_OnLoad actions: [event-next, event-next, condition]
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: BeforeInitialize actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(1)}
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: btn_search_v97078ReviewShopLoadStart_0_0 actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(2)}
main.f970e717b4861fde.js:160 action: slider-open param:  {page: 'v97078ReviewShopLoadStart_0_2'}
[Violation] Forced reflow while executing JavaScript took 62ms
[Violation] Forced reflow while executing JavaScript took 240ms
main.f970e717b4861fde.js:160 (2) ['rowChanged event started for v97078ReviewShopLoadStart_0_0', Array(1)]
main.f970e717b4861fde.js:160 rowChanged: v97078ReviewShopLoadStart_0_0_RowChanged actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(1)}
main.f970e717b4861fde.js:160 action: row-update param:  [{…}]
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_OprSeq} ===> 10
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_OprSeq} ===> 10
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 (2) ['rowChanged event completed for v97078ReviewShopLoadStart_0_0', Array(2)]
[Violation] Forced reflow while executing JavaScript took 469ms
17[Violation] 'setTimeout' handler took <N>ms

The override of Form_Onload never appears.

I also tried a "before form onload like this:

Debug spit this out:

20[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
10[Violation] 'requestAnimationFrame' handler took <N>ms
main.f970e717b4861fde.js:160 application initialized
main.f970e717b4861fde.js:160 event: Form_OnLoad actions: [event-next, event-next, condition]
main.f970e717b4861fde.js:160 event: Form_OnLoad_Override actions: [event-next, event-next, condition]
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: BeforeInitialize actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(1)}
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: btn_search_v97078ReviewShopLoadStart_0_0 actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(2)}
main.f970e717b4861fde.js:160 action: slider-open param:  {page: 'v97078ReviewShopLoadStart_0_2'}
main.f970e717b4861fde.js:160 (2) ['rowChanged event started for v97078ReviewShopLoadStart_0_0', Array(1)]
main.f970e717b4861fde.js:160 rowChanged: v97078ReviewShopLoadStart_0_0_RowChanged actions: [condition]
main.f970e717b4861fde.js:160 action: condition param:  {expression: 'true', onSuccess: Array(1)}
main.f970e717b4861fde.js:160 action: row-update param:  [{…}]
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_OprSeq} ===> 10
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_OprSeq} ===> 10
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_JobNum} ===> 037190-1-1
main.f970e717b4861fde.js:160 {v97078ReviewShopLoadStart_0_0.JobOper_AssemblySeq} ===> 0
main.f970e717b4861fde.js:160 (2) ['rowChanged event completed for v97078ReviewShopLoadStart_0_0', Array(2)]
26[Violation] 'setTimeout' handler took <N>ms
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: SysInitTransView actions: [row-update]
main.f970e717b4861fde.js:160 action: row-update param:  [{…}]
main.f970e717b4861fde.js:160 %dashboardFilters% ===> %dashboardFilters%
main.f970e717b4861fde.js:160 action: condition param:  {expression: '{TransView.SysDashboardFilters} === true', onSuccess: Array(2)}
main.f970e717b4861fde.js:160 {TransView.SysDashboardFilters} === true ===> false === true
main.f970e717b4861fde.js:160 action: event-next
main.f970e717b4861fde.js:160 event: SysInitTransView actions: [row-update]
main.f970e717b4861fde.js:160 action: row-update param:  [{…}]
main.f970e717b4861fde.js:160 %dashboardFilters% ===> %dashboardFilters%

It still fired the slider.

I tried an after Form_Onload event and added a slider-close, but got no closing of the slider. A dialog-show by itself on the after form load event did show the dialog box after I clicked the slider closed.

Grasping now. I just want that slider not to open. Grr.

Thanks,

Joe

Rename the sliderpage to something like xxxBlahblah it won’t fire. You can then use the SysInit event to fire whatever you want :slight_smile:

2 Likes

@klincecum
Why Are You Laughing Season 8 GIF by The Big Bang Theory

Pseudobulbar affect?

2 Likes

I’ve tried renaming the slider, but the refresh and overflow menu disappear when I do:

image

image

It’s always something.

Joe

1 Like

This is actually a known thing. Happens with deleting and renaming.

^ If you want to leave it that way.
My brain isn’t fully awake for your original question yet.

HannahLoading.exe

Processing Downloading GIF by Mashable

3 Likes

Yep, I found this as well. It’s shit but it’s a workaround… :slight_smile:

Oh–okay. So this whole slider thing is a bit of red herring. You’re overriding the event, but I’m going to wager that slider isn’t the one being shown.
Your BAQ has a parameter, yeah? That will always fire, slider or no. The easiest way is to nix the params and change your BAQ to use filters instead which can be sent using the provider model.

1 Like

But, like also… vote for this. This needs to happen yesterday: Silently Pass Parameters to BAQs in App Studio | Epicor Ideas Portal (aha.io)

3 Likes

Ah, I hadn’t tried the BAQ yet (I’m not the author, just doing the uplift). I’ll check to see if there’s a parameter. There is a tracker on the dashboard, though.

Thanks,

Joe

Snow White Coffee GIF

No parameters. I’m just going to copy the dashboard and delete the trackers so it won’t do that. I hope.

Thanks,

Joe

1 Like

What’s the slider look like?
What’s it say at the top? Does it match your tracker fields?
It’s possible there’s an initialize event for them that’s popping it open too.

The slider had the same title as the tracker on the old form.

I deleted all the trackers (in a copy of the dashboard), deployed, and created new trackers in a panel card on the main form (like your example). Works great!

Thanks,

Joe

1 Like