Kevin Zwemmer
06/08/2023, 8:50 PMleo_ns
06/08/2023, 10:11 PM/**
* This function is triggered when the "Closed Lost" button is clicked.
* It sets the estimate status to "Closed".
*/
function closedLostButtonFunction() {
// Set the estimate status to "Closed"
nlapiSetFieldValue('status', 'Closed');
// Save the record
nlapiSubmitRecord(nlapiGetRecord());
}
/**
* This function adds the "Closed Lost" button to the Estimate form.
*/
function addButtonToEstimateForm() {
// Create a new button object
var closedLostButton = form.addButton('custpage_closed_lost_button', 'Closed Lost', 'closedLostButtonFunction');
// Set additional properties of the button if needed
closedLostButton.setLayoutType('outsidebelow');
closedLostButton.setDisabled(false);
// Add more customization options as required
// Save the changes to the form
form.setScript('closedLostButtonFunction');
}
// Call the function to add the button when the form is loaded
addButtonToEstimateForm();
leo_ns
06/08/2023, 10:17 PMbattk
06/08/2023, 10:59 PMbattk
06/08/2023, 11:00 PMbattk
06/08/2023, 11:06 PMKevin Zwemmer
06/09/2023, 6:53 AMbattk
06/09/2023, 7:24 AMbattk
06/09/2023, 7:24 AMKevin Zwemmer
06/09/2023, 7:25 AMbattk
06/09/2023, 7:27 AMKevin Zwemmer
06/09/2023, 7:29 AMbattk
06/09/2023, 7:31 AMbattk
06/09/2023, 7:36 AMsuitemike
06/09/2023, 3:13 PM