UI action for cancel flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2024 04:28 AM
Hi All.
When i initiate the Cancel Renewal UI action. I need to bring the info message that, instead of cancelling the renewal do you need to revoke the certificate. If yes, then it should redirect to a catalog which i use. if user click the info message cancel then it should cancel the renewal.
My else condition is not redirecting to the catalog url. However, i checked the alert is working. Am i missing any syntax here?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2024 07:16 AM
@AnandKumar1 Okay then , Here's an alternative approach you can try, using g_navigation.navigate:
function CheckConfirm() {
var answer = confirm("Do you want to revoke the certificate? If Yes, click OK. To proceed with cancelling the certificate, click Cancel");
if (answer != true) {
alert("Answer not true");
gsftSubmit(null, g_form.getFormElement(), 'cancel_renewal');
} else {
alert("Service portal endpoint");
g_navigation.navigate("https://test.service-now.com/sp?id=sc_cat_item&sys_id=293403d22b52e100e587593069da1575");
}
}
if (typeof window == 'undefined') {
current.state = 4; // Cancel the record
current.work_notes = "The certificate has been set to cancelled.";
current.update();
action.setRedirectURL(current);
gs.addInfoMessage('Cancelled.');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2024 07:44 AM
Hi Aniket, Still same.. I think the key is correct, but the redirection is not happening. Should i need to go via any property call?