Editing read only fields (ACL)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 06:58 AM
Hello,
I'm struggling to come up with the best way to accomplish the following.
I have a field on the project table called "Go live date" and I would like to be read only if the field has a date set. If there is no set date then anyone can enter a date but doing this will lock the field out so the date can't be changed.
What I would then like is to allow a designated user with a specific role to be able to change that field whenever needed.
I'm not very good at scripting (still learning) and don't seem to be able to accomplish this using conditions in an ACL.
Does anyone have any suggestions?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 07:08 AM
UI Policies/Scripts sound like what you're looking for! You should be able to right click on the banner of whatever page you're working on and it will be on the drop down menu.
I would take a look at UI Policies first.
Edit: Screenshot Added. Spelling/Grammar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 07:11 AM
Thank you,
I'm aware of UI policies but I'm not very adverse at the scripting side of things. I did try to accomplish this using the condition builder with no success.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 07:40 AM
Hi,
(for manual entry)
write onsubmit client script, so that till you save the form you can edit that field.
function onSubmit() {
//Type appropriate comment here, and begin script below
if(Go_live_date !='')
{
g_form.setReadOnly('Go_live_date', true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2017 07:43 AM
Hello,
thank you for this. This is currently what I'm working with
function onLoad() {
var golive = g_form.getValue('u_go_live_date');
if ( golive != '') {
g_form.setReadonly('u_go_live_date',true);
}
{
var admin = g_user.hasRole('bc_it_project_admin');
}
}
I'm attempting to do a role check and if user has the role, the field can be edited if the user doesn't have the role, then it's read only.