what is the script to create incident in virtual agent without using topic block

LakshmiRatC
Tera Contributor

what is the script to create incident in virtual agent without using topic block as i have universal request plugin.So it creating universal request

1 ACCEPTED SOLUTION

Looking at the out-of-the-box topic and the out-of-the-box script include, that's the only part influencing it. So make sure to perform a cache flush after changing the system property.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

5 REPLIES 5

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Can you clarify your question a bit more?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

LakshmiRatC
Tera Contributor

I have to create incident from 'x' topic, so i have used OOTB "create incident" topic block . But instead of incident, universal request number is getting created

If you look at the topic, it applies a script include, and there's it is described that if system property "

sn_itsm_va.com.snc.create_universal_request_with_incident" is set to true, that a UR is created.
 
So did you check this?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi, Yes I have checked and made it false. Still not fixed.

 

 

 createUR: function() {
        var create_ur = gs.getProperty("sn_itsm_va.com.snc.create_universal_request_with_incident");
        if (create_ur == "false") {
            if (new GlidePluginManager().isActive("com.snc.universal_request")) {
                var universalgr = new GlideRecord("universal_request");
                universalgr.initialize();
                universalgr.insert();
                return universalgr;
            }
        }
        return;
    },