- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 12:01 AM
Below is the script written in UI policy to make fields as mandatory based on condition, how to write this in data policy, since it cannot be
converted since UI script is running a script.
UI policy code:
var fields = g_form.getEditableFields();
for (var x=0; x < fields.length; x++){
if (fields[x] != 'sys_created_on' && fields[x] != 'sys_created_by' && fields[x] != 'sys_updated_on' && fields[x] != 'sys_updated_by')
g_form.setReadOnly(fields[x],true);
}
Solved! Go to Solution.
- Labels:
-
Problem Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 12:15 AM
This is not possible as far as I understand on Data policy
But you can try to do the same via a business rule on the table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 12:15 AM
This is not possible as far as I understand on Data policy
But you can try to do the same via a business rule on the table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 02:06 AM
Hi Kalai,
How to write below code in business rule.
I know u cant use g_form in business rule
g_form.setReadOnly(fields[x],true);
is this can be write as current.setReadonly()?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 03:16 AM
Are you trying to make readonly or fields as mandatory? If readonly - Refer the comments by Gaurav.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2017 03:19 AM
ACLs? how about if there is more than 70 fields to make fields as read only. Need to add 70 fields as read only in acls