
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 11:25 AM
Does anyone have code they have created (and can share) for a UI action on incident that creates a story from the inc? I know the general concept (like look at the create problem action and get a sense from there what needs to be done), but I thought if someone has it handy, I wouldn't have to reinvent the wheel.
Thanks,
Shannon
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 11:32 AM
This can be edited depending on what fields you want populated.
var newStory = new GlideRecord("rm_story");
newStory.initialize();
newStory.short_description = current.short_description;
newStory.description = current.description;
newStory.state = 6; //draft
newStory.opened_by = gs.getUserID(); //Story opened by will be whoever clicked UI action
newStory.insert();
Please mark this as helpful/correct if it resolved your question!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 11:32 AM
This can be edited depending on what fields you want populated.
var newStory = new GlideRecord("rm_story");
newStory.initialize();
newStory.short_description = current.short_description;
newStory.description = current.description;
newStory.state = 6; //draft
newStory.opened_by = gs.getUserID(); //Story opened by will be whoever clicked UI action
newStory.insert();
Please mark this as helpful/correct if it resolved your question!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 11:35 AM
Thanks a lot!
Shannon