- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 12:05 AM
I want to make the Planned Start Date and Planned End Date fields editable on the Change Request form, but only until the state reaches Schedule, and only for users with the admin role. There is already a client script in place, and I’d like to add these conditions to it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 12:06 AM - edited 07-23-2025 12:07 AM
Hello @pawank2,
var changeState = g_form.getValue('state');
if (g_user.hasRoleExactly('admin') && (state == 'New ' || state == 'Assess' || state == 'Authorize')) {
g_form.setReadOnly('start_date', false);
g_form.setReadOnly('end_date', false);
} else {
g_form.setReadOnly('start_date', true);
g_form.setReadOnly('end_date', true);
}
Please mark my response Accepted and Helpful for future references.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 12:06 AM - edited 07-23-2025 12:07 AM
Hello @pawank2,
var changeState = g_form.getValue('state');
if (g_user.hasRoleExactly('admin') && (state == 'New ' || state == 'Assess' || state == 'Authorize')) {
g_form.setReadOnly('start_date', false);
g_form.setReadOnly('end_date', false);
} else {
g_form.setReadOnly('start_date', true);
g_form.setReadOnly('end_date', true);
}
Please mark my response Accepted and Helpful for future references.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 12:07 AM
Thanks for reply my post.