Isaac Rumbold
06/26/2025, 7:42 PMCeligo AI
06/26/2025, 7:42 PMAI generated answer (using internal Slack threads):To create a confirmation modal when deleting a record, you can use a Client Script in SuiteScript. Specifically, you can use the
N/ui/dialog
module to create a confirmation dialog box. However, please note that SuiteScript does not offer a way to delete script records directly.
Here is a sample code snippet that shows how to create a confirmation dialog box:
javascript
/**
* @NApiVersion 2.x
* @NScriptType ClientScript
*/
define(['N/ui/dialog'], function(dialog) {
function confirmDeletion() {
var options = {
title: "Confirm Deletion",
message: "Are you sure you want to delete this record?"
};
dialog.confirm(options).then(function(result) {
if(result) {
// Code to delete the record
}
}).catch(function(reason) {
console.log("User cancelled deletion");
});
}
return {
saveRecord: confirmDeletion
};
});
In this code, the confirmDeletion
function is called when the user attempts to save the record. The function creates a confirmation dialog box with the title "Confirm Deletion" and the message "Are you sure you want to delete this record?". If the user confirms the deletion, the code to delete the record is executed. If the user cancels the deletion, a message is logged to the console.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/26/2025, 7:42 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816784263
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815504313
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814176321
Celigo AI
06/26/2025, 7:42 PM