control when the create child incident button shows

Joyce Olson
Tera Contributor

I am working on developing major incident using Parent Child relationship.   I have created a UI Action to create a button that will create and populate a new child incident.     I have also included on the incident form a checkbox field   major_incident to identify the parent.     I want to have the Create Child Incident button display on the parent incident only but am struggling on how to accomplish this.

1 ACCEPTED SOLUTION

Hey Joyce,



Sorry for not telling you this sooner, I have already answered something similar ==>



1) Create a UI Policy --> Set Condition as field (check_box) is true


2) In the Script tab set Run scripts true


3) In the if condition write      


                  $$('#action_name')[0].hide();     //This will hide the top button


                  $$('#action_name')[1].hide();     //This will hide the bottom button as well



4) In the else condition write      


                  $$('#action_name')[0].show();     //This will show the top button


                  $$('#action_name')[1].show();     //This will show the bottom button as well



you can check it over here How to hide UI Action based on field change in form without using DOM?


Also check this post How to hide/show an UI action on field changes


View solution in original post

8 REPLIES 8

nitish99
Tera Guru

Hi Joyce,



You can put a check in the condition of UI Action if(current.major_incident==true).


Nitish -



I added the Condition to my UI Action and now by Create Child Incident button does not show on any incidents.


Hey Joyce,



I recreated a similar scenario on my dev and its working fine,


Have a look ==>


UI Action


find_real_file.png


Incident Record Before==>



find_real_file.png




Incident Record After==>


find_real_file.png


This is without UI Policy


shloke04
Kilo Patron

Hi Joyce,



You can give the condition as below:



current.u_checked== true



find_real_file.png



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,
Shloke






Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke