How to set fields as Read only

shaik_irfan
Tera Guru

Hello Everyone,

I have a requirement where i need to set list of fields as Read only:

1.Number

2.Type

3. Program

By configuring dictionary of the field i can set Type & Program as read only but i unable to set Number field as Read only.... I dont know whether it is a Best practice or not, can anyone please guide me the best practice to set read only for above fields

1 ACCEPTED SOLUTION

Can i know the reason why you are going with Client Script.



In case its requirement, then go ahead with Onload client script and write the code as :---- g_form.setReadOnly("field_name",true);



But I would still suggest go ahead with UI policy.


View solution in original post

10 REPLIES 10

Can i know the reason why you are going with Client Script.



In case its requirement, then go ahead with Onload client script and write the code as :---- g_form.setReadOnly("field_name",true);



But I would still suggest go ahead with UI policy.


Thanks Sneha,



I done with UI Policy for all the fields.



But what i came to know is whenever i am trying to set Number as Read only which is extended by Task table i unable to do that, i dont know the reason might be some ACL are stopping to that or it might not work on Number field coz which affects all the other tables.


Hi Shaik,



You should be able to set Readonly in dictionary level for Number field which is best practices.


If not as Sneha comment you go ahead with UI Policy which is best practices.


Client script is last option g_form.setReadOnly("field_name",true);


Thanks Balaji!


I got it using UI Policy.



But what i came to know is whenever i am trying to set Number as Read only which is extended by Task table i unable to do that, i dont know the reason might be some ACL are stopping to that or it might not work on Number field coz which affects all the other tables.


Shaik Irfan wrote:



can you help me out using client scirpting ?


I would recommend the following approaches first:


  1. ACLs to limit write access to nominated roles/conditions
  2. Dictionary changes (but sounds like you tried that)
  3. UI Policy, which only affects forms

Have a word with your platform admin, have them apply the   ACL at server level. Client Scripting isn't intended for security, because it's not a safe security model.