Setting the Contact type on requests from the service catalog

Kathy3
Giga Contributor

Hi,

I am using Kingston and I have found several articles on how to set the contact type of a record producer. I need to be able to set the contact type on the sc_request to Self Service for orders from our service catalog.

I have the scripts, I am wondering what would best practice be? Catalog script? Business Rule? Client side script? We are in the process of implementing workflows as well.

I have tried setting all 3 and I am still not getting the contact field to update when I order an item from the catalog.

Thanks!

 

11 REPLIES 11

Mark Roethof
Tera Patron
Tera Patron

Hi there,

If it concerns a Record Producer, use the Script field within the Record Producer. Using Catalog Client Scripts would not make sense. Business Rules could be an option. In my opinion: the Script field within the Record Producer is less work and more clear to maintain.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

So I was able to get the following to work in my dev instance, but when I moved it to our sub prod, it is not setting the contact type.

Any Ideas?

find_real_file.png

Hi there,

I assume you're submitting the Record Producer thru the Service Portal? The script shown will set the value of a variable in the Record Producer to submit, not the value on the actual Request (or maybe it does if you're using map-to-field on a variable or something in that direction).

Again, if it's a Record Producer, why not use the script field of the Record Producer instead of using a Client Script (i would expect a Catalog Client Script? not a Client Script?).

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Try to add to the Script part of the Record Producer:

current.setValue('contact_type', 'self-service');

(assuming the choices are untouched / out-of-the-box)

With this, probably there no need for a Client Script?

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn