Automatic problem ticket creation

lakshmidurga
Tera Expert

Hi Community,

I have no idea where to start building,so I am putting here for your suggestions\

For any P3,P4 and P5 incidents if a checkbox is selected a pop-up should be displayed where it should have series of questions and after filling these questions a problem ticket need to be created.

Please suggest

Thanks and Regards

Lakshmi Vallisetty

1 ACCEPTED SOLUTION

brianrichards
Tera Guru

Another approach would be to use quickForm() to pop up a subset of your Problem form. Check out https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/


https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/



One caution here is that QuickForms do not do any kind of validation (such as Client Scripts or UI policies), so I'd keep the form simply if you go this way.



I used this approach in order to resolve multiple incidents using the instructions here (which leads you down the road of something slightly different than what you're doing, but you can at least see another implementation): http://wiki.servicenow.com/index.php?title=Closing_Multiple_Incidents#gsc.tab=0



- Brian


View solution in original post

11 REPLIES 11

Create an onChange client script for your checkbox



Code similar to this:




function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue === '') {


          return;


    }



    if (g_form.getBooleanValue('u_checkbox',true)){


  var q1 =   prompt("question 1", "");


  var q2 =   prompt("question 2", "");


      var gr = new GlideRecord("problem");


      gr.description = q1 + " " + q2;


      gr.insert();


      g_form.addInfoMessage("Problem created");


    }


}


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Can probably reuse a lot from here: Make a popup, do some choices and let it fill out the form for you


But instead of filling out the existing form, you can create a ticket instead.



//Göran


Hi Goran,



Thanks so much for your blog.



I created UI Action and UI Page.But clicking on button is not taking me to UI Page.



Can you also suggest me how to create problem button once you click on OK and populate the information on UI Page into description



//Lakshmi


action.PNGpage.PNG


brianrichards
Tera Guru

Another approach would be to use quickForm() to pop up a subset of your Problem form. Check out https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/


https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/



One caution here is that QuickForms do not do any kind of validation (such as Client Scripts or UI policies), so I'd keep the form simply if you go this way.



I used this approach in order to resolve multiple incidents using the instructions here (which leads you down the road of something slightly different than what you're doing, but you can at least see another implementation): http://wiki.servicenow.com/index.php?title=Closing_Multiple_Incidents#gsc.tab=0



- Brian