Create Change Request through servicenow script

Bala19
Tera Contributor

Hello All,

I have a catalog form. On the submission of this catalog form I have create a normal change request and assign values to it through script. Could you please someone guide me?

Thanks

Bala

 

 

1 ACCEPTED SOLUTION

Hi Bala,

Sample script here

var gr = new GlideRecord('change_request');

gr.field1 = current.variables.<variableName1>;

gr.field2 = current.variables.<variableName2>;

... and so on

gr.insert();

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

View solution in original post

7 REPLIES 7

Hi Bala,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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

Hi Bala,

I think by mistake you didn't mark the actual answer as correct which had the sample script.

Regards

Ankur

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

Chandu Telu
Tera Guru
Tera Guru

Hi 

 

you can create workflow and add the script in run script activity 

to create a normal change

 

Note: Please mark reply as CORRECT if it has answered your question OR mark it as HELPFUL if it has guided you towards the solution

Thanks
Chandu