Unable to set a filed of the type "Script" read only

Anubhuti Mittal
Tera Contributor

I have a form field of the type "script" and when I try to make the script read only using dictionary / UI policy the changes do not apply to this filed.

Please assist

4 REPLIES 4

Anirudh Pathak
Mega Sage

Hi @Anubhuti Mittal ,

You can try "onLoad" client script or "onChange" client script based on your requirement and can try the below code -

g_form.setReadOnly('YourfieldName',true);

 

Anubhuti Mittal
Tera Contributor

@Anirudh Pathak thanks for the reply.

The usual solutions are not working. I am using this field type " script" for the 1st time. Even making the field read only at dictionary level doesn't help.

SN_Learn
Kilo Patron
Kilo Patron

Hi @Anubhuti Mittal ,

 

Create a read ACL on that field, in the role add 'admin' role so that no one else can view it.

SN_Learn_0-1721043391994.png

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Ratna Jyothi
Tera Contributor

Hi @Anubhuti Mittal 
Try creating an ACL for the specific field if dictionary level/Ui policy restriction is not working.
Also, check is there something overriding this field to become read-only.

Regards,
Ratna Jyothi