- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 06:47 AM
Is there a way to take a past change request either approved, cancelled or in waiting approval state and copy it. From there change the dates and submit it as new?
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 07:22 AM
Hi Joan,
It is actually really easy. What you need to do is create a new UI Action(you define the type - button, cotext menu, etc.), as:
1. select the table: change_request
2. set the UI Action as Active and select when to show - on insert, update, etc.
3. have the script which creates a new record and carries over all attributes/fields that you wish (please see it attached)
And that should be it.
I hope this would help you. If so, please mark it up.
Good luck in creating!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 07:07 AM
Should just be about building a UI Action that initializes a new record, copies over the fields you want copied, and insertting it into the table. Nothing tricky, you just need to decide what fields to copy, and what to set certain fields (such as the approval status).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 07:11 AM
You make it sound easy. I am in day 6 with my company and only have a 2 day System Admin class under my belt. Can you provide a more detailed (step by step) procedure?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 07:18 AM
Goto your change request table, right click in the heading to access Personalize - UI Actions.
Click New. Name it appropriately, and determine where you want it (Form Button, Form Link, or Form Menu).
Then in the script, something like the below, expand as needed for additional fields.
var newChange = new GlideRecord('change_request');
newChange.initialize();
newChange.assignment_group = current.assignment_group;
newChange.short_description = current.short_description;
newChange.state = 1; // Or some other appropriate value
// Add additional fields you want to copy or set here.
newChange.insert();
gs.addInfoMessage(current.number + ' Change Request copied to ' + newChange.number);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2014 04:59 AM
Thank you, this was most helpful.