Google Apps Script: Confirm Dialog

July 31, 2019
var ui = SpreadsheetApp.getUi();
var response = ui.alert('Delete?', ui.ButtonSet.YES_NO);

if (response == ui.Button.YES) {
    // do something
}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.