How can I link a Story Record created from an INC in a Related List Tab on the INC

Hola Ola
Giga Guru

Hello All,

 

On our Incident form, I can currently 'Create Story' using UI Action button (see code).

 

var story = new GlideRecord("rm_story");
story.short_description = current.short_description;
story.description = current.description;
story.priority = 4;
story.state = -5;
story.insert();

action.setRedirectURL(story);

 

What I would like to do is create a Related Lists Tab on BOTH the Incident and Story forms/record that would list/show the associated records from each Incident and Story.

 

Original Request:

Can you please update the Incident record to display any related stories that were linked to this incident.
ADDITIONALLY I would like the Story record to be able to display any related Incidents.
ALSO - I would like both fields to AUTOPOPULATE with the appropriate related record Number.

 

Example: I was assigned an incident today. I created a story from that incident and sent it to the KSC EHR team for assignment. I don't recall the story number and I wanted to add new information to the story for the developer but I cannot recall the story number, it is not listed as a related record on the Incident, and now I have to do some create querying to try and find it.

 

Thank you for your anticipated help.

2 REPLIES 2

shivangi k
Kilo Sage

Hi @Hola Ola ,

 

As you are creating story from incident record , so are you storing incident number on story in any field?

 

Can you please share screen shot for both forms i.e. incident and story?

 

Regards,

Hello,

 

This is the script from the 'Create Story' UI Action on the Incident form:

var story = new GlideRecord("rm_story");
story.short_description = current.short_description;
story.description = current.description;
story.priority = 4;
story.state = -5;
story.insert();

action.setRedirectURL(story);

 

PIC 1 - Shows my Create Story UI Action Button on the INC form

PIC 2 - is the INC Related Link Tab that I want the Story Number/Record that is created from the Incident to display.

PIC 3 - is the STORY Related Link Tab that I want the INC Number/Record that is associated/created from the Incident to display

 

I hope these answers your question?