- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 02:34 AM
Hi Team,
My requirement is to create all 3 types of change through background script. Please advice on this.
Thanks&Regards
Reena Kumari
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 05:47 AM
I got the issue, chg_model value was missing, try below:
Emergency:
var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'emergency'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='62d10fa1c303101035ae3f52c1d3aec1';
chg.insert();
Standard:
var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'standard'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='e55d0bfec343101035ae3f52c1d3ae49';
chg.insert();
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2022 05:47 AM
I got the issue, chg_model value was missing, try below:
Emergency:
var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'emergency'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='62d10fa1c303101035ae3f52c1d3aec1';
chg.insert();
Standard:
var chg = new GlideRecord('change_request');
chg.initialize();
chg.type = 'standard'; // replace if you want to create another tupe of change;
chg.short_description = "test"; // replace for any other short desc;
chg.chg_model='e55d0bfec343101035ae3f52c1d3ae49';
chg.insert();
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2022 11:51 PM
Hi Raghav,
Is there any way to create standard and emergency change request without models. As we are not using models in our project.
Thanks
Reena Kumari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2022 12:25 AM
Model is required because, when I tried without models, it did not work
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 11:15 PM
chg.chg_model='62d10fa1c303101035ae3f52c1d3aec1';
chg.chg_model='e55d0bfec343101035ae3f52c1d3ae49';
what is the value you are assigning to chg_model, from where you got this value ?