Create Survey Button on Incident form

Community Alums
Not applicable

Need to create Survey button on incident form, so once we click on survey button, Survey checkbox on current incident should be checked and it should redirect to new incident survey created form.

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Community Alums 

 

May i know why you need a survey button on Inc. Survey is something, which trigger, when Incident get closed. It is OOTB and we recommend to use that.

 

Adding new button will increase the technical debt.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Appanna M
Tera Guru

Hello @Community Alums ,

You can try the below:

Fill out the UI action details as follows:

  • Name: Create Survey
  • Table: Incident [incident]
  • Action name: create_survey
  • Client: true
  • Onclick: onClickCreateSurvey()

 

function onClickCreateSurvey() {
    // Check the "Survey" checkbox on the current incident
    g_form.setValue('u_survey', 'true'); // Replace 'u_survey' with the actual field name of the survey checkbox on the Incident table
    // Redirect to the new incident survey form
    var redirectURL = '/u_incident_survey.do?sys_id=-1&action=new'; // Replace 'u_incident_survey' with the actual table name of your incident survey table
    window.location.href = redirectURL;
	//action.redirectURL(redirectURL);
}​

 

Make sure you set  the Isolate Script to  False. 

Please Mark My Answer as Helpful and Accept as Solution, if you find this article helpful or resolves your issue.

Appanna_0-1711823111468.png

 

Appanna_1-1711823134540.png