RITM Form Field ReadOnly

Bishal Sharma1
Tera Contributor

Hi Team,

 

I want to make state field read only in RITM form. However the state field is coming from task table. How can I make task table field readonly in ritm form.

 

Please suggest.

11 REPLIES 11

You can do via UI policy or client script, but for full security best way will be ACL, else you will need to have a onload client script but in order to secure editing from list layout, you will also need a oncelledit client script.

ACL will handle both the scenario more efficiently.

 

Best Regards
Aman Kumar

I understand that ACL is much more reliable than other scripts however we are not allowed to go with the ACL here.

 

Can you suggest on which i table i should write ui policy is it on RITM or Task since the field is coming from TASK table. Can you show me here. 

On the RITM table, if you have a configuration on child table, it overrides the parent tables configuration, so you don't have to worry about if it is coming from task table, once you create the configuration on the RITM table, it will be only applicable to state field which is on the RITM table.

Best Regards
Aman Kumar

ok so i have done below but still not working:

 

1. Created display business rule to fetch the logged in user sysid\

 

	var cuser = gs.getUser(); //Get refrence of logged in user
	g_scratchpad.member = cuser.isMemberOf('eb77332d37bb1a00a1a11a7943990e0a'); //checking if he/she belongs to this group

 

2. Created ui policy as below (ss attached):Script.pngUI Policy.png

 
can u check this configuration since it is not working.
 
 

@Aman Kumar S wrote:

On the RITM table, if you have a configuration on child table, it overrides the parent tables configuration, so you don't have to worry about if it is coming from task table, once you create the configuration on the RITM table, it will be only applicable to state field which is on the RITM table.


Remove the UI policy action, if you are using the Run script, there is no need for that.

Update your script as:

Execute if true:

if(g_scratchpad.member == true){

    g_form.setReadOnly("state", false);

}

else{

     g_form.setReadOnly("state", true);

}

 

Execute if false should remain empty.

 

Best Regards
Aman Kumar