cancel button on incident form
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:19 AM
Hi Team,
I need cancel button on the Incident form.
once click the cancel ui action and below dialog box appear.
Ui action script:
function cancelTicket() {
var dialog = new GlideDialogWindow("cancel_incident_ticket"); //Render the dialog containing the UI Page 'task_comments_dialog'
dialog.setTitle("Are you sure want to cancel the incident"); //Set the dialog title
dialog.render(); //Open the dialog
}
UI Page Script:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<html>
<!-- <head> -->
<!-- <style>
/* Example styles */
.form-container {
width: 50%;
margin: auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #f9f9f9;
}
.form-group {
margin-bottom: 10px;
}
.form-group label {
display: block;
font-weight: bold;
}
.form-group select, .form-group input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}
.btn-group {
margin-top: 10px;
}
.btn {
padding: 8px 16px;
cursor: pointer;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
margin-right: 10px;
}
.btn-no {
background-color: #f44336;
}
</style>
</head> -->
<body>
<div class="form-container">
<div class="form-group">
<label for="cancelCode">Cancel Code:</label>
<select id="cancelCode" name="cancelCode">
<option value="">None</option>
<option value="1">Duplicate</option>
<option value="2">Open In Error</option>
<option value="3">ATT Indiced Store Respective</option>
</select>
</div>
<div class="form-group">
<label for="note">Cancel Note:</label>
<input type="text" id="note" name="note">
</input>
</div>
<div class="btn-group">
<button class="btn btn-yes" onclick="Yes()">Yes</button>
<button class="btn btn-no" onclick="No()">No</button>
</div>
</div>
</body>
</html>
</j:jelly>
Once user click the "Yes" button need to set the "cancel Code" value as "Resolve Code" value and "Cancel Note" value as "Resolve Note" and state as "Cancelled".
Click the "No" button - no action required.
Regards,
Manasa.
0 REPLIES 0