Set Short Description on Request from Service Catalog

John Schmalhors
Kilo Contributor

I'm trying to use a custom variable in a short description and running a script in a workflow to set this. I'm having multiple issues with the requested items created from the request and updating the short description to said item name but I've been able to work around that by waiting 10 seconds in the workflow before trying to set the value. Now, I'm able to use the set value command to update the assignment group and short description successfully. In my order guide, I have a variable called "meeting_name" that a user can input and would rather have that as my short description but its just failing. 
I've tried "request.short_description = current.variables.meeting_name;" in a run script command but it comes up undefined request. 

Any help would be great!

2 REPLIES 2

Elijah Aromola
Mega Sage

Is this workflow running on the request item? If it is you can't just set the value, you have to update the record. I would try doing request.update(); after you update the short description, and if that doesn't work you might have to do a query like so:

// try
request.short_description = current.variables.meeting_name;
request.update();

//if that doesnt work try

var req = new GlideRecord('sc_request'); 
req.get(request);
req.short_description = current.variables.meeting_name;
req.update();

Please mark my answer as helpful/correct if it helped resolve your issue!

I got ReferenceError: "request" is not defined. (#0(eval); line 2) on both scripts. 😞

 

The workflow is running on the request. NOT the requested item.