One of the new modules in Suitescript 2.0 is the “N/ui/dialog” module but unfortunately it doesn’t include a prompt method. I did some digging and found that the dialog module is uses Sencha Ext JS. Since Ext JS doesn’t require the dialog module it can run on both SS 1.0 and 2.0!
Before (Native JS):
After (Ext JS):
Additionally, thanks to this post from Abaci I was able to run this code right before the record is saved, which can be very useful to set the value of a field right before saving.
Code samples here:
https://ursuscode.com/netsuite-tips/…on-saverecord/
This is a cached copy. Click here to see the original post.