Write a script to display inactive problems with p2 incidents.

sabbani rishika
Tera Contributor

Script

12 REPLIES 12

Sagar Pagar
Tera Patron

Hi,

Have you try to do with scripting? where you stuck? can you share the script?

 

Thanks,
Sagar Pagar

The world works with ServiceNow

I've used on submit type and the below script.

 var gr = new GlideRecord('problem');
    gr.addQuery('state',4);
    gr.query();
    while(gr.next()){
        var r = new GlideRecord('incident');
        r.addQuery('priority',2);
        r.query();
    }

Its not getting displayed.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

it would be nice if you share your complete business requirement

where are you writing the script?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

I'm using Client script on submit type.