How to update request short description same as catalog item name

Tejaswini9
Tera Expert

Hello Guys,

How i can update the request short description same as catalog item name.

Thanks,

Teju

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I assume you must be having workflow for your catalog item so no need of BR

Use this script inside the Run Script activity of your catalog item workflow

var request = new GlideRecord('sc_request');

request.get(current.request);

request.short_description = current.cat_item.name;

request.update();

Regards
Ankur

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

View solution in original post

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Within your Workflow or Flow, you just need to add a utility/step to update the short description.

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

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

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

asifnoor
Kilo Patron

Hi,

You can write a after insert BR on ritm table and add below code

var req = current.request.getRefRecord();
req.short_description = current.cat_item.name;
req.update();

Mark the comment as correct/helpful once worked.

Viraj Hudlikar
Tera Sage

Hi Tejaswani,

Since your catalog item will be having workflow so in that just add Run Script activity at start which will just set Short Description as per your requirement.

current.short_description =  current.cat_item.getDisplayValue();

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.

Thanks & Regards,
Viraj Hudlikar.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I assume you must be having workflow for your catalog item so no need of BR

Use this script inside the Run Script activity of your catalog item workflow

var request = new GlideRecord('sc_request');

request.get(current.request);

request.short_description = current.cat_item.name;

request.update();

Regards
Ankur

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