Event-next to itself

Ok so I am working on print preview yet. I have it working and it now waits for the report to finish when it runs. I’m just curious how dangerous it would be to have an event that runs a BAQ then conditions on that and if the report guid is the same it runs itself if it doesn’t it runs an event with the rest of the process.

That’s an oxymoron. Expecting to possibly have the same GUID

Sounds like your typical recursion to me.
Just make sure that it truly does have an exit or else yes… bad things.

I load the report GUID from a BAQ before I submit it to the agent into trans view. I then run the BAQ looking in the system by user for the top row. Thanks @hmwillett for the BAQ I compare the two and when they are different (meaning the report has finished) I run the rest of the code for print preview.

@hmwillett That’s my fear is that I give it now way out except when the report finishes. What happens if the report fails? The there will at some point be a way out because the user will run a report at some point but what is it doing in the mean time. I’m getting ready to test this on a long running report and watch the logs and task manager to see the resources it uses.

Chewing up your resources.
I’ve put myself in infinite loops before and they don’t freaking stop when you close the browser. @josecgomez had to yell at me. :disappointed:

I think it required an app server recycle?

I’m not sure I want @josecgomez yelling at me :rofl: I will have a look and see if I can put an or in and stop it at a half hour for the big reports and 3 minutes for the small ones. Thanks for the heads up I assumed it was client side on the browser. I’m Slowly learning JS and how Epicor is handling everything now.

1 Like

You say yelling I say…There was no yelling just mind concern… cause our “IT Security” guy was asking all sorts of uncomfortable questions and I didn’t want them to disrupt my Bit Coin Miner Epicor App Servers. :grin:

The Daily Show Wtf GIF by The Daily Show with Trevor Noah

2 Likes

Yelling Dexters Laboratory GIF

^ Are you sure it wasn’t like that???

Americas Got Talent Reaction GIF by Got Talent Global

I has never yelled at youz!

Oh Okay I Understand Will Ferrell GIF by filmeditor

I would definitely have some kind of timeout built in.

You could also add in a conditional “kill” switch as an additional check in case
you needed out before then. (Check a tag, udcode, etc)

Combining recursion and an early reference to Winne Pooh.

image

So to update everyone on this. I am trying to do print preview auto open. Using @hmwillett and @josecgomez jumping off point Kinetic Web browser Print Preview - #56 by klincecum

While this works it pulled up the report before the one I just ran and then opening the client I am bombarded with reports popping up. Although this will likely not matter in live just in case we are prepared
I modified it that it will open any output format PDF all the excels, csv, and word with the appropriate program then added a loop to wait for the new report to finish. and update sysrptlst so that the previews won’t pop up when entering the classic app.

If anyone wants instructions I am throwing them together so I don’t miss anything when doing this repetitively across all reports. Yes I am making even reports triggered from the overflow menu work like Sales order acknowledgment and invoices and edit lists. I am concerned about the loop but haven’t been able to get it to trip and become infinite.

I’d like to see your work when you are done.
If there are issues, I’m sure they can be ironed out.

Hopefully they won’t patch out what you’re using before a replacement can be done.