how to show ritm number in short description field on change request form

Arjun Reddy Yer
Tera Guru

Can anyone help me in how to show RITM number in short description on change request form.

To auto populate Change Request Planned Start Date depending upon the RITM creation date 

aAs mentioned in below screen shot the highlighted fields should get auto populate when the User select the option in Catalog Item @Ankur Bawiskar @BharathChintala @Anil Lande @Sumalatha Y @mattystern @SatyakiBose @asifnoor @Pradeep Sharma 

yerasumalli_0-1678240488030.png

yerasumalli_0-1678247547468.png

as the Impact Business Unit field is refered to a below mention varaible 

yerasumalli_1-1678247628920.png

in the data lookup table when the User selects Group then the Local/Regional CAB field should populate Regional CAB other wise it should populate Local CAB

 

1 ACCEPTED SOLUTION

Hi @Arjun Reddy Yer ,

 

AnveshKumarM_0-1678357212156.png.

 

In the screenshot above you haven't created any GlideRecord reference for change record, but you are calling a variable called "changeGlideRecord", so it's throwing error in that step of work flow.

 

If you want to create a change Request along with the Task, You should write code something like this.

var changeGlideRecord = new GlideRecord();
changeGlideRecord.initialize();
changeGlideRecord.short_description = current.number + 'Standard Change Request for Firewall Change Request';
changeGlideRecord.satrt_date = current.created.addDays(11);
/* Populate all the change field values here like this*/
....
....
changeGlideRecord.insert();

 

For the Local/Regional CAB field, as you said the company is a reference field, there should be some criteria to identify which is the group company and which is not. If you can share us that we can help in writing the logic to populate the Local/Regional CAB fields.

 

Thanks,

Anvesh

Thanks,
Anvesh

View solution in original post

29 REPLIES 29

priyasunku
Kilo Sage

Hi @Arjun Reddy Yer 

 

you are setting the short description of change with the request name right, there you can append current.parent.number+' '+shortdescription.

 

if you want to update it after the request creation, you can do it using run script activity or in the set Value activity.

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

so if I mention as below screen shot will it be fine

yerasumalli_0-1678262511203.png

it's not showing the RITM number in Short Description field on Change Request Form

yerasumalli_0-1678262765719.png

 

@Arjun Reddy Yer 

please write that in script section.

current.short_description= current.parent.number+' '+Standard change Request for Firewall Change Request

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

it's not working as it's showing error even If I had removed "task." aslo it's error

yerasumalli_0-1678262962347.png

 

@Arjun Reddy Yer 

 

you have to keep text in quotes

current.short_description= current.parent.number+' '+'Standard change Request for Firewall Change Request';

Sorry I missed it while sending

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful