make filed Readonly in business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2017 01:33 AM
in client side we can achieve this byusing : g_form.setReadonly('impact'',true) or else UI policy action but in
server-side script business rule i have tried as below
current.setReadonly('impact',true);
but not working
can any one have a idea?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2017 01:36 AM
Btes approcah would be to use ACL to make field readonly .Since it works both form and list
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2017 01:37 AM
Hi,
What is your use case? You should use Access controls for making fields read-only at server side.
Thanks
PS: Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2017 01:39 AM
Have a look into the wiki article how business rules work:
You could use the current.setAbortAction(true) method to prevent the saving.
Abort a database action in a business rule
The best approach would be the Access Control Rules:
You define which user/roles have access to explicit tables/records/fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2017 01:41 AM
Hi Venkat,
Setting a field as ReadOnly or Mandatory or Visible is totally on UI Side, i.e, on the client side. So you can achieve this via Client side scripting (Client Script, UI Policy etc.). But when you say Business rule, you mean to set those client side behavior in the server side--doesn't this sound odd!?!
Well, you also have options to do so from ACL and Dictionary entries apart from Client Script and UI Policy. Could you please elaborate what drives you to think about Business rule for setting a field ReadOnly?
I hope this helps.Please mark correct/helpful based on impact