Submit Order(POST) - Service Catalog API - Scripted REST API

Vaishnavi35
Tera Guru

Hi

I have doubt regarding Submit Order(POST) in Service Catalog API. I am able to create an REQ/RITM using REST API.

I want to get Short Description to be reflected in the list.

find_real_file.png

I hope you all have understood my question.

 

Thanks & Regards,

Vaishnavi

1 ACCEPTED SOLUTION

Personally, I would add this as one of the first steps in your workflow, so before any approvals/tasks.

find_real_file.png

find_real_file.png

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

Kind regards,
Mark

---

LinkedIn
Community article list

 

 

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

21 REPLIES 21

Because you only have available:
- sysparm_quantity
- variables

You could send a variable with the short_description.
OR
You could map the catalog item short description.

For both ways, you could:
- Add script to the workflow
- Add before insert business rule

Is this enough information for you? Or do you need help with setting this up? Also see my previous questions, is this for only one catalog item? Or for all?

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

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Hi Mark,

This is only for one catalog item & the short description of the Catalog Item not from the variable.

find_real_file.png

Okay. I think i would like to try with the WorkFlow one then can you help me setting this up please it would be great help. I am new to this. 

Thanks,

Vaishnavi

If going for workflow, and updating the short description of the request according to the Catalog Item, add a Run Script step with only:

var gr = new GlideRecord('sc_request');

if(gr.get(current.request)) {
	gr.setValue('short_description', current.cat_item.short_description);
	gr.update();
}

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

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Personally, I would add this as one of the first steps in your workflow, so before any approvals/tasks.

find_real_file.png

find_real_file.png

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

Kind regards,
Mark

---

LinkedIn
Community article list

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Thank you so much for the help Mark it worked 🙂 Happy New year too 🙂