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

1. For Change Request Planned End Date field should be auto populated as 11 days after RITM creation date

as the script is not working which I had written as mentioned in below screen shot @priyasunku @AnveshKumar M @asifnoor @Ankur Bawiskar @Sumalatha Y @Anil Lande @mattystern @BharathChintala 

yerasumalli_0-1678334020005.png

 

2. To auto populate the Local/Regional CAB field according to the User selection of Company Field on Catalog form when the Comapny name conatins Group then it should populate as Regional CAB other wise it should populate as Local CAB as the Company field is Look up data reference table as mentioned in the screen shot when the User select Company field

the Local/Regional CAB field is String Type

yerasumalli_1-1678290534126.png

Company field Type: Lookup Select Box

yerasumalli_1-1678369473537.png

and the field is designed as mentiond in below screen shot

yerasumalli_2-1678369575391.png

 

 

 

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

it's not working as the below script is not executing required to auto populate Planned End Date field on Change Request form @AnveshKumar M @priyasunku @asifnoor @Ankur Bawiskar @Sumalatha Y @Anil Lande @mattystern @BharathChintala 

yerasumalli_0-1678369414460.png

and Company field Type: Lookup Select Box

yerasumalli_1-1678369473537.png

and the field is designed as mentiond in below screen shot

yerasumalli_2-1678369575391.png

 

Hi @Arjun Reddy Yer ,

Can you send the screenshots for properties of the workflow and create task activity like the one below.

 

AnveshKumarM_0-1678423117356.pngAnveshKumarM_1-1678423223356.png

 

AnveshKumarM_2-1678423249969.png

 

AnveshKumarM_3-1678423278501.png

 

Thanks,

Anvesh

Thanks,
Anvesh

Please find the screen shots as per the design of the workflow

yerasumalli_0-1678457469635.png

yerasumalli_1-1678457540614.png

yerasumalli_2-1678457624904.png

 

yerasumalli_3-1678457716369.png

yerasumalli_4-1678457795411.png