Removing or disabling options from the state field list Option does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 03:12 AM
Hello
I'm working on a Tokyo Version instance. I implemented the solution described on this link :
To my surprise the function disableOption and enableOption do not work on the Onload script client, anyone had this problem ?
Thanks
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 03:51 AM
Hi,
disableOption and enableOption are not OOB functions but custom one created. Since the UI changed in tokyo it is very much possible that they stopped working. This is one of the downside im afraid of creating custom scripts.
You can ensure that your client script is isolated , that might be once possible thing restricting it. Alternatively you will have to use RemoveOption and AddOption instead and change your logic to OOB Functions available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 04:24 AM
Hi,
Thank you for your feedback, indeed it is a custom script, which I do not understand why it works on an OnChange script client ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 04:33 AM
hmmm....can you check and compare between your onload and onchange scripts, maybe Isolate script flag has something to do with it.
Maybe order of onload client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 09:08 AM
I think it's a timing issue with onLoad scripts. I fixed a similar issue in our environment after upgrading to Tokyo by adding a setTimeout(function() {
<disable Option code>
}, 1000);