Field should be editable for change manager only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2015 03:58 AM
HI Team,
Requirement : I have created one filed Implemneted without approval on change form . this Fied Should be editable only for change manager when change status is Complete.
Point-1: I have made the filed read only from dictionary
Point 2 : I have written the UI policy which is mention bellow but it is not working
Condition: Status is Completed
Execute if True :
function onCondition() {
if (g_user.hasRole('change_manager'))
{
g_form.setReadonly('u_implemneted_without_approval',false);
}
}
Execute if False:
function onCondition() {
g_form.setReadonly('u_implemneted_without_approval',true);
}
Pls. help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2015 04:06 AM
I would remove the readonly on the dictionary entry and use a write ACL for role control and UI policy for the conditional state control.
R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2015 10:23 PM
Hi Anil, be aware that making a field read only on dictionary is almost like doing the variable a constant the one cannot be changed. In other words, you will not be able to set it to editable while it's a read only field on dictionary.
I hope this is helpful!
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2015 10:27 PM
as for the recommended methods to do what you want to accomplish, these are:
a) ACL: Create a write ACL using your table.field on which status is completed and on the role related list you set the Change Manager role. Simple as that !
b) Through client script. doing something similar to what you show above, perhaps on an OnChange of the status field.
Thanks,
Berny