Has anyone got a modal progress indicator to work ...
# suitescript
j
Has anyone got a modal progress indicator to work on a transaction form on the client side. I've tried jQuery etc but it seems that iterating over line items in SuiteScript causes some sort of UI blocking and the dialog doesn't show until after the execution is complete.
c
Since its client side, you can use the promise API and the N/ui/message module to show/hide a banner message on the record
j
@JohnnyC initiate the loading / progress indicator and then start doing the work after a 1ms timeout to give the indicator enough time to render before NetSuite APIs start blocking main thread
j
Tried that which does seem to work but for me I need to give it two seconds
Thanks
j
2s seems pretty long, 1ms works for me, but if it works it works I guess
I'm using sweetalert for loading indicator though so maybe that's the difference
j
Yea I was just using a jQuery dialog perhaps not optimized, but now I just tried it again at 1ms and it worked.
👍 1