Need to Populate Short description and description RITM variables on newly opened Change Request

Indup
Tera Expert

HI guys,

There are two variables on RITM, Short Description & Description. If we open the RITM, in the related lists there is Change Request tab. So once we go to that Change Request tab and click new, it will give 3 options Normal, Standard and Emergency. Whatever we select, the change request form gets open. Then in that Change form i want to populate Short Description and Description fields with the values of Short Description and Description of RITM variables. FOr that i have written a BR and its not working. Can someone correct my code plz

my BR:

Table: sc_req_item

after-->insert

Script:

var a = new GlideRecord('change_request');
a.initialize();
a.get(current.sys_id);
a.short_description = current.variables.short_description;
a.description = current.variables.description;
a.insert();

 

Regards,

Indup

23 REPLIES 23

@Indup 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

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

@Indup 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

 

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

@Indup 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

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

johnfeist
Mega Sage
Mega Sage

Hi Indup,

Are you sure that you are looking at variables description and short_description and not the defined columns?  If you are looking to grab the values from the columns, you need to leave out the variables component on the right side of the assignments.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster