UI action - Linking a task to an incident

Brigitte V
Tera Contributor

Hello
I've created an extended table of the task table. Using UI action I create an incident.
It works but how can I add the incident number in the related list as on the attached example?


Thanks for your help

 

2024-11-26_11h54_56.png

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

Are you saying you click the UI Action on your TEXP record and it creates an Incident, but the Incident doesn't reference the TEXP record at all?  You should have a line in your UI Action that populates a reference on the Incident back to the TEXP record ... which at this point should be current.  

 

something like...

whateverYourGlideRecordVariableToInsert.parent = current.sys_id;

View solution in original post

4 REPLIES 4

Runjay Patel
Giga Sage

Hi @Brigitte V ,

 

If you have your table reference to incident then configure related list, it will come by default.

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

In this video i have explained about Web service integration in ServiceNow like how it works, how we can configure it, what are the prerequisite and many more. I have covered below topics in this video. 1. understand Web Service. Like when and how we will use it. 2. Talked about Inbound and ...

Uncle Rob
Kilo Patron

Are you saying you click the UI Action on your TEXP record and it creates an Incident, but the Incident doesn't reference the TEXP record at all?  You should have a line in your UI Action that populates a reference on the Incident back to the TEXP record ... which at this point should be current.  

 

something like...

whateverYourGlideRecordVariableToInsert.parent = current.sys_id;

Thanks, it works.
I had set inc.parent = current.number
After changing to inc.parent = current.sys_id the field is updated

That'll definitely do it!
In case you weren't aware, the sys_id is the real unique identifier ServiceNow uses for any record in any table.  Its what the reference field *really* stores.  Anything else you see in a reference field (like number) is just a front end illusion so we don't have to deal with massive sys_ids with our puny great-ape brains.