I am writting code on my project on a drop down field client script. Below code show sweetalert message with a ok button. when user press ok button a drop down menu and a text field value will change. Sweetalert message is appearing and after pressing ok button text field value also changing but drop down field value not changing.
if (machine_occupancy > 0) {
// Check if the quantity input is higher than the store status
Swal.fire({
icon: "warning",
title: "Machine Occupied",
text: " Batch No: " + batch_no + " of " + customer_name + " is currently processing " + process + " on " + machine + " machine. Please check Finishing Activity section if process is not yet complete.",
confirmButtonText: "Ok",
}).then(function() {
// Clear and focus the quantity input field
$(this).fields("x_delivered_to").value('Processing'); // this is drop down menu
$(this).fields("x_delivered_by").value(4); //// this is text field
});
} else {
// Do nothing, the quantity is valid
// You can add additional logic or actions here if needed
}
});
}
$(this).fields(“x_delivered_to”).value(‘Processing’); this drop down field value is not changing. Can experts identify where i made mistake?