How to create a REOPEN button (Similar to REOPEN INCIDENT button ) in EMPLOYEE CENTER PORTAL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 11:56 AM
Hi everyone!
I need help in creating a REOPEN button in Employee Center portal for a different application (not incident).
We recently created a new application using App Engine Studio. The new app is kind of similar to Incident. Now on the Employee Center portal, we want it to have a Reopen button that will only appear if the ticket is in RESOLVED state (similar to Incident). The button should ask for comments first before the ticket can be reopen again. How can I achieve that?
See sample image below for reference:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2023 12:24 PM
Hi @Byron Plant ,
Hope you are doing great.
To create a REOPEN button in the Employee Center portal for your new application, follow these steps:
Open the App Engine Studio and navigate to the application you created, similar to the Incident application.
Within the application, identify the field that represents the ticket status. Let's assume it's called "state."
Create a new button in the Employee Center portal interface. You can achieve this by customizing the portal's UI through Service Portal Designer.
Add a script to control the visibility and behavior of the REOPEN button. This script should execute when the page loads to check if the ticket is in the RESOLVED state. If it is, display the REOPEN button; otherwise, hide it.
// Assuming the "state" field represents the ticket status
var ticketStatus = $sp.getValue('state');
var reopenButton = document.getElementById('reopenButton'); // Replace 'reopenButton' with the actual ID of your REOPEN button element
// Check if the ticket is in the RESOLVED state
if (ticketStatus === 'RESOLVED') {
reopenButton.style.display = 'inline'; // Show the REOPEN button
} else {
reopenButton.style.display = 'none'; // Hide the REOPEN button
}
// Function to handle the REOPEN button click
function reopenTicket() {
var comments = prompt('Please provide comments before reopening the ticket:');
if (comments !== null && comments !== '') {
// Perform the necessary action to reopen the ticket (update ticket status, log comments, etc.)
// Replace the following line with the actual code to reopen the ticket:
alert('Ticket reopened successfully with comments: ' + comments);
} else {
// Handle case when comments are not provided
alert('Comments are required to reopen the ticket.');
}
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 12:03 PM
Hi @Riya Verma thank you so much for responding. I'll try this solution and let you know if this works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 11:42 PM
@Byron Plant , is this working for you ?
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 02:17 AM
When to apply this BR please : After, Before, display, async ?
Thanks