The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Redirect to ESC Homepage after Order guide submission

Ram33843094
Tera Contributor

After Order guide submission (checkout) page , post submission form  looks something like below(1st screenshot).

 

So skipping that request summary page. It should redirect to the ESC Homepage (2nd Screenshot).

 

Note : Order guide is submitted through HR Task (HRJ Task Submit Order guide) task type. 

 

Ram33843094_0-1684408404885.png

 

Ram33843094_1-1684408660475.png

 

Used the below 2 methods applying on Submit catalog client script, but no luck

 

// First Method

 

function onSubmit(){
function redirectToHomepage() {
window.location.href = "https://instancename.service-now.com/esc";
}
document.getElementById("ec_pro_dashboard").onSubmit = redirectToHomepage;
}

 

//Second Method

var URL = "?id=instance_URL_Link";   //Redirect part of widget sc item custom

 

top.window.location = URL;

 

@Ankur Bawiskar @Community Alums @Sandeep Rajput @AnveshKumar M 

6 REPLIES 6

@Community Alums 

 

By using the below code, it is trying to redirect to homepage after first section itself i.e. Describe Needs by giving the popup message (Leave/Cancel). When click on Leave, it is redirecting to homepage.

 

But it should redirect after checkout page at the end.

 

var URL = "?id=instance_URL_Link";   //Redirect part of widget sc item custom

 

top.window.location = URL;

 

1.Redirecting at the below stage only.

 

Ram33843094_0-1684410497048.png

 

2. Redirection to happen at this stage

Ram33843094_1-1684410726132.png

 

 

 

 

Sandeep Rajput
Tera Patron
Tera Patron

@Ram33843094 

Redirection to request page is usually taken care of via Catalog checkout widget.

Screenshot 2023-05-18 at 11.07.28 PM.png

Unfortunately, this is a read only widget hence you might need to clone it fit it into the existing widget hierarchy and update the redirection according to your need.