On click of ui action button the corresponding field is getting disappear

keerthi19
Tera Guru

Hi All,

I am trying to create one button in incident table. Based the button selection one field should be visible and mandatory.

But if i select the  ui action in incident form its working but when i submit the incident the particular field is getting disappear. Not sure how its happening...Any idea will be appreciated..

This is my ui action condition :

((current.state !=6) && (current.u_major_incident == false) && (gs.hasRole("admin")) || gs.getUser().isMemberOf(­'database') || current.u_major_incident == true)

Below is the ui action script :

function testbutton(){

g_form.setVisible('u_incident_manager',true);
g_form.setMandatory('u_incident_manager', true);

}

And i wrote on onload client script to hide the u_incident manager field on onload. 

But somehow its not working ..can someone help me to resolve the issue.