Hey guys! Does anyone know of a way to make a "Spi...
# general
a
Hey guys! Does anyone know of a way to make a "Spinner" when a Suitelet is being executed? Or just any way of letting the user know the button has been pressed? The button is loaded on a Sales Order on a User Event before load function.
s
Probably gonna want to go to #C29HQS63G, but the general approach is to have an inlinehtml field spinning, checking some condition constantly and showing/hiding the spinner based upon the condition
k
I've definitely seen this in client accounts before
Not sure i'm a huge fan because it doesn't really stop the "i'm gonna smash the button 30 times to get a response" thing.
s
what i've seen and liked is for a suitelet to set a status flag to "script in progress" or whatever, grey out the button, and pop a dialog box saying "your thing is in progress, you'll be notified by email when it's done." When the suitelet finishes, it unchecks the box. it's not a spinning rainbow wheel, but maybe you could combine this design with @Sandii's approach to get a html widget to display a dancing penguin while the checkbox is checked?
a
@KevinJ of Kansas Kevin I am not a huge fan of it either.. But the client want's a button to fire off a email for a specific Order Acknowledgment on the Sales Order record.. Is there a better way? BTW I have been using workflow's a lot more because of you!!! You have suggested to them a couple times before. And now before I script something, I always ask myself would I be better off just building a workflow.
k
It's definitely about balance. I'd be more inclined to when you have a button push just navigate them to a different page that indicates the email is in queue - or something like that - that way if it takes to to actually send the email because of stuff you are doing they aren't mashing it.
If they are just wanting to know something sent - or is going to send - show message is a decent option for accomplishing that.
b
you can do a pure javascript solution using one of the many ui libraries out there