how to autopopulate the incident field with the incident number in related records

Siva_Prasad
Tera Contributor

Hi

 we want to autopopulate the incident field with the incident number in related records section of SIR form 

Siva_Prasad_0-1761630520404.png

what is the exact solution for this ? In PDI it is working , 
-TIA

9 REPLIES 9

 gr.setValue('incident', currentIncident.getUniqueValue());

It is working fine  can i do the same thing for the scenario when new incident is created from SIR form from SIR workspace ?

 

@Siva_Prasad 

for that you need to check the workspace UI action

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

check it out @Siva_Prasad . Now I am confused first was to security incident from incident and now saying new incident is created from SIR form?

 

As you are saying it is working fine in PDI, you can apply this solution on your requirement that you are working on.

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

Our requirement was that create incident should appear only one time when we are in form context menu of SIR form in SIR workspace,  that is the main requirement , for that we are checking OOB behaviour in PDI and applying same in our instance , 

Siva_Prasad_0-1761640688812.png

for problem and change they are coming only one time i.e , one to one relation but in the case of create incident it is not working but it is working in PDI automatically 




Suneesh
Tera Contributor

Hi @Siva_Prasad ,
By looking into your requirement, Whenever you click on create security incident button it will create a security incident in this UI Action you can use  gr.setValue('incident', current.getUniqueValue());

For create incident button check the condition, I hope you need modify condition accordingly with problem or change conditions.

Please mark helpful and bookmark my article if it helps your query.

 

Thanks

Suneesh

 

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

Thanks and Regards,
Suneesh