How can we populate 'Description & Short Description' field values from Catalog Item to the Request(sc_request) Form's Description & Short Description field?

Angshuman3
Mega Guru

Once I am creating a Catalog Item which is having a Description value 'DESCRIPTION' & Short Description value as 'SHORT', then how can the same values be auto-populated on the Request Form's Description & Short Description field

1 ACCEPTED SOLUTION

Angshuman3
Mega Guru

Hi, 

 

Thanks all for your guidance. I got a solution to this by writing this script in 'Run Script' in the workflow 

request.description = current.variables.description;
request.short_description = current.variables.short_description;

This solved the issue.

 

View solution in original post

8 REPLIES 8

SanjivMeher
Kilo Patron
Kilo Patron

Yes. For such scenario, we have created another multi-text field 'items' on Request field which gets populated with all the items associated to that request. 


Please mark this response as correct or helpful if it assisted you with your question.

Angshuman3
Mega Guru

Hi, 

 

Thanks all for your guidance. I got a solution to this by writing this script in 'Run Script' in the workflow 

request.description = current.variables.description;
request.short_description = current.variables.short_description;

This solved the issue.

 

Oya Orhan
Giga Guru

This is my code to set request's description and short description in a 'run Script' activity in the workflow:

//get request

var grRequest = new GlideRecord('sc_request');
grRequest.get(current.request);

//set request values
grRequest.description = "write your description here";
grRequest.short_description = "Write your shot desc. here";
grRequest.update();

hrm...this gives me a unique key violation...  i must have a business rule conflicting with it...