The CreatorCon Call for Content is officially open! Get started here.

UI action condition - related table condition

Pastupe
Mega Guru

Hello

I have form on table SC_TASK

Under form is related list displaying also button

Button is on table u_test

My problem is that I want hide button when TASK is not active and dont know how to refer from u_test table to sc_task table through condition on UI action form

How to do this when button must be on table u_test ?

Please help me to understand how to build such UI action condition for above screnario

thank you

/Petr

1a.jpg

2a.jpg

1 ACCEPTED SOLUTION

Gurpreet07
Mega Sage

You could use following type of code in a onLoad Client script of sc_task table



if(g_form.getValue('state')==1){   //1 for active
gel('sysverb_edit_o2m').style.display = 'none' ;         //get Id of ui action by developerTool

}


View solution in original post

5 REPLIES 5

tanumoy
Tera Guru

Could you please provide the screenshot of the List Control of Add Roles..


Hello,


did you asked for the below ? If not, please provide me example screen and I will try to do my best to give you what you need to view


thank you



/Petr


1a.jpg


Gurpreet07
Mega Sage

You could use following type of code in a onLoad Client script of sc_task table



if(g_form.getValue('state')==1){   //1 for active
gel('sysverb_edit_o2m').style.display = 'none' ;         //get Id of ui action by developerTool

}


Ashish Kumar Ag
Kilo Guru

Hi,


Try Below.


Create a on load Client Script in sc_task table.


add the below code.



function onLoad() {


  var gr = g_form.getValue('active');


  //alert(gr);


  if(!gr){


    gel('sys id of UI action Add role').style.display = 'none'; //hide the button


  }


}



Let me know the outcome.