has anyone tried using the N/ui/dialog method ‘confirm’ inside a validateField event?
I just want to display a confirm dialog box with an “OK” and “Cancel” button depending on the value that the user enters in a certain field. Pressing “Cancel” should cause the validation to fail.
I can do this easily with the vanilla JavaScript ‘confirm’ method. But SS2.0 gives you this nice little dialog API that generates prettier looking versions of those dialog boxes. However, the ‘confirm’ method doesn’t return a simple boolean value. Instead, it returns a promise object (asynchronously) making it useless in a validateField event, since the event doesn’t wait for the results of the promise.
Any thoughts??