How to create ui action, as a related link in incident table

Gopal14
Tera Contributor

Hi Team,

 

How to create a Form Link UI Action on Incident table.

When we click on that link Form Link UI Action, it is should be copied short description and description field values into new form.   

 

Note: new form is custom table.   

 

@Community Alums 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Gopal14 

 

https://youtu.be/kfnzAmernJg

 

This video will help you to create the UI Action as related link.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Community Alums
Not applicable

Hi @Gopal14 ,

I tried your problem in my PDI and it works for me. Please check below solution 

Create UI Action and add below code 

var gr = new GlideRecord('incident');
gr.initialize();
gr.sys_id = -1;
gr.short_description = current.short_description;
gr.description = current.description;
gr.insert();
action.setRedirectURL('incident.do?sys_id='+gr.sys_id)

SarthakKashyap_0-1716897710683.png

 

Result 

SarthakKashyap_2-1716897818966.png

 

When I click on related link "Incident Form" it will redirect to new incident form with copied short description and description

 

SarthakKashyap_3-1716897845505.png

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards 

Sarthak

 

Hi @Community Alums 

 

Thanks for the help.

 

I want to populate configuration item field also.

 

var gr = new GlideRecord('sn_customerservice_case');
gr.initialize();
gr.sys_id = -1;
gr.short_description = current.short_description;
gr.description = current.description;
gr.asset.ci = current.cmdb_ci;
var mjcase = gr.insert();
action.setRedirectURL('sn_customerservice_case.do?sys_id='+mjcase+'&sysparm_view=major_case');
 
however configuration item is not populating