Disable related list edit on specific state using ACL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 02:11 AM
How to set related list edit as disabled in ACL. See below steps done.
1. In the Change Request form, Problem related list should be disabled when state is Authorize in Change form.
Screenshot below shows that problem statement is already disabled. ACL is shown in #2
2. ACL created to disable problem statement.
Data condition:
3. Upon checking, Problem list is also disabled. But this time, it does not check with the change status.
My expectation is Problem list should not be disabled, how do I do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2024 03:09 AM
Hi @pjftenorio,
To disable related list editing based on a specific state using ACLs (Access Control Lists) in ServiceNow, you can follow these steps:
1. **Identify the Related List**: Determine the related list for which you want to disable editing based on a specific state. Let's assume you want to disable editing in the "Work Notes" related list when the state of an incident is "Closed".
2. **Create an ACL**: Go to `System Definition` > `Access Control` > `Create ACL`. Choose the appropriate table (e.g., "Incident") and set the operation to "Write". This ACL will control editing permissions.
3. **Define Conditions**: In the Conditions field of the ACL, specify the condition that must be met for the ACL to apply. For example, to target incidents in the "Closed" state, you might use a condition like `state=7`. You can adjust this condition based on your specific requirements.
4. **Set the Role**: In the Roles field, specify the roles for which you want to apply this ACL. Choose the roles that should be restricted from editing the related list.
5. **Specify Actions**: In the Script field, define the script that determines the actions to be taken when the condition is met. To disable editing, you can use JavaScript code like `answer = false;` to prevent editing.
6. **Test**: Test the ACL to ensure it behaves as expected. Create an incident in the "Closed" state and try to edit the related list. The editing should be disabled for the specified roles.
7. **Review and Adjust**: Review the ACL configuration and adjust as needed based on testing and any additional requirements.
By following these steps, you can create an ACL in ServiceNow to disable related list editing based on a specific state. Remember to test thoroughly to ensure the ACL behaves as intended in your instance.
Please accept my solution if it resolves your issue and thumps 👍 up.
Thanks
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 09:48 PM