- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 07:10 AM
Hi,
I'm trying to make close_notes mandatory(by default this field will be read only) when canceling a change task using a UI button which i have created as below:
Action Name: cancelRecord
Client checkbox: True
onClick: cancelTask();
function cancelTask() {
if (g_form.getValue('close_notes' == '')) {
g_form.setMandatory('close_notes', true);
g_form.showFieldMsg('close_notes', 'Enter Close Notes', 'error');
return false;
} else {
alert('Cancelling the task');
gsftSubmit(null, g_form.getFormElement(), 'cancelRecord');
}
}
if (typeof window == 'undefined') {
cancelTaskRecord();
}
function cancelTaskRecord() {
current.state = '4';
current.update();
action.setRedirectURL(current);
}
But I can't make close notes mandatory. The control always goes into the else block, and I'm able to cancel it, but I'm not getting an error to fill in the close notes.
Please help me.
Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 12:18 PM
@Shidhi Ideally creating an additional ACL on the change request/task table should work. User should be able to get access on your new ACLs on the close_notes field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 10:44 AM
I tested the changes I and @Sandeep Rajput proposed, and it works in my instance. Seems you need to disable the UI Policy. What state is the change_task in when you click the UI Action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 10:54 AM
Hi @Bert_c1
State is in Assigned and it is working for Task Assignee i.e., the field is editable whereas for Change Initiator it is Read Only. Any idea why this behavior.
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 11:25 AM
@Shidhi Could you please check if there are ACL applying on the field which is making it read only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 11:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 06:29 AM
Created a new ACL and it is now working only for Admins but not for other users. Could you please suggest any approach.
Thank you!