- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 02:34 AM
Hello,
I have a requirement on the Contract form in ServiceNow where the Renewal section needs to be:
1. Editable in the Draft state (default behavior).
2. Read-only in the Active state (current behavior).
3. Editable in the Active state as per the new requirement.
Currently, the Renewal section becomes read-only after the contract's state changes to Active. I need to update this so the Renewal section remains editable when the state is Active.
Here’s what I’ve tried so far:
Checked existing UI Policies for the Renewal section but didn’t find anything setting it as read-only.
Investigated potential Client Scripts and Access Control Lists (ACLs), but it’s unclear how the read-only behavior is enforced.
Could someone guide me on:
1. How to make the Renewal section editable specifically in the Active state?
2. Steps to debug and identify where the current read-only behavior is configured?
Any suggestions, best practices, or examples would be greatly appreciated!
Thanks in advance for your help!
Best regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 03:08 AM
The read-only behavior of the Renewal section is controlled by specific ACLs that currently allow write access only in the Draft state. Based on the identified ACL (as shown in the screenshot), here’s how you can resolve the issue:
Solution:
Modify the ACL Condition:
Update the ACL condition to grant write access in both the Draft and Active states.
Existing Condition:
current.state == 'Draft'
Updated Condition:
current.state == 'Draft' || current.state == 'Active'
Steps to Implement:
Open the ACL identified in below screenshot.
Modify the condition field as per the updated logic.
Save and publish the ACL changes.
Verification:
Navigate to the Contract form.
Test the behavior of the Renewal section in:
Draft State: Ensure it remains editable.
Active State: Ensure it is now editable.
Other States: Ensure it remains read-only.
Best Practices:
Perform changes in a sub-production environment to validate the behavior.
Ensure the updated ACL does not inadvertently allow unnecessary access.
This should resolve the issue while adhering to your requirements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 02:41 AM
To make the Renewal section editable in the Active state on the Contract form in ServiceNow, follow these steps:
Check UI Policies: Ensure there are no UI Policies setting the Renewal section as read-only based on the contract's state. If one exists, modify the conditions to allow editing in the Active state.
Client Scripts: Review any client scripts that may enforce the read-only behavior when the state is Active. Modify or add a script to ensure it's editable in this state.
Debugging: Use browser developer tools or ServiceNow’s debug options to trace the script execution and identify where the read-only state is being applied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 03:08 AM
The read-only behavior of the Renewal section is controlled by specific ACLs that currently allow write access only in the Draft state. Based on the identified ACL (as shown in the screenshot), here’s how you can resolve the issue:
Solution:
Modify the ACL Condition:
Update the ACL condition to grant write access in both the Draft and Active states.
Existing Condition:
current.state == 'Draft'
Updated Condition:
current.state == 'Draft' || current.state == 'Active'
Steps to Implement:
Open the ACL identified in below screenshot.
Modify the condition field as per the updated logic.
Save and publish the ACL changes.
Verification:
Navigate to the Contract form.
Test the behavior of the Renewal section in:
Draft State: Ensure it remains editable.
Active State: Ensure it is now editable.
Other States: Ensure it remains read-only.
Best Practices:
Perform changes in a sub-production environment to validate the behavior.
Ensure the updated ACL does not inadvertently allow unnecessary access.
This should resolve the issue while adhering to your requirements.