- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 06:29 AM
The button "New" in related list should be enabled for users only if the status of record is in “Open” or “Need More Info” statuses. These records are in a custom table in Service Now and once the status changed to Submitted or Approval, this "New" button should be disabled.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2022 06:39 AM
Hi
Please follow and replicate the below steps but as per your required buttons :
I removed my old reaction, I did not read correct. You should look at the Related list action:
Search for the New - Interaction (in your case search for your "New" )
Click on advanced view:
Add the following to the script condition:
&& parent.sys_class_name + "" !== "sn_hr_core_case"
update:
Insert and stay.
Set the original one to inactive.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2022 08:58 PM
Hi
No Sandeep. My question was "How to enable or disable “New” button in related list based on State of records in experience UI". And the issue is couldn't derive record state from the answer you have given. As per the below conditions, I can check table name, parent table name etc. but can't see the data in a table to derive state.
Thanks,
Rohan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2022 09:25 PM
parseInt(parent.state) != '9' && parseInt(parent.state) != '8'