How to create story from Incident form as create story is an UI action on Incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 01:01 AM
Hello Team,
I have a requirement to create a story by clicking on UI action called create story on incident form and that story form should be opened in new tab not on same page how can I achieve this requirement?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 01:08 AM
Hi,
There is a solution available for this. Did you check link?
If you are stuck somewhere, help elaborate details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 01:14 AM
Thank you for your response but I read somewhere that, this requirement will be completed by Script Include and Ajax to open story form on new page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 01:53 AM
Hi @User13807
you can try below code
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();
action.setRedirectURL(newStory);
If my answer solved your issue, please mark my answer as ✅Correct & 👍Helpful