Anyone got the dialog.confirm to work with the sav...
# suitescript
r
Anyone got the dialog.confirm to work with the saveRecord on a client script? I know it returns a promise and does not stop the execution. Is there a way to stop the execution? Or do we have to use the confirm (native browsers confirm dialog). Thanks in advance
b
the usual workaround is returning false to stop the saveRecord, and then later doing the equivalent of clicking the save button again (i personally favor selecting the save button and clicking it)
its unnecessary dom manipulation if you can just get away with using confirm
r
Oh I see interesting. Yeah will stick to native confim them. Hope NS adds a param make the promise a option flag or something on the dialog.cofirm
m
Or supports returning a promise to saveRecord
s
I use sweetAlert2 a lot, it's much nicer
r
What's that?
s
b
sweetalerts is prettier and does popups better, but it still is asynchronous and thus will require a workaround to use with the saveRecord entrypoint
💯 1