Madrid Service Portal g_form.setDisabled and g_form.setReadOnly do not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2019 05:59 AM
For a Service Portal application I have found that the g_form.setReadOnly and the g_form.setDisabled functions do not affect the readonly value for sc_req_item variables from either a widget or a Client Script that is triggered by a display Business Rule.
I have confirmed that the g_form.setVisible and g_form.setDisplay does work as expected for both sc_req_item fields and variables and the g_form.setReadOnly does work for fields.
Please let me know if you have encountered this issue and found a solution. I need to be able to set read-only on various variables based on the group the user is in as well as on variable values in the sc_req_item.
Thank you in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-17-2019 06:38 AM
Thanks for sharing your code, so after I went through it, one thing I will point out is that g_form.isReadOnly was returning true after every test whether the field was readonly or not. So that may very well be deprecated at this point because it does seem broken.
I'd check out this link:
And also this one (seems like some of your code is similar):
Sorry I wasn't more help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-17-2019 06:54 AM
Thank you very much for the information.
Unfortunately the first suggestion is not related to Service Portal for which g_form.setVariablesReadOnly is not available and it throws an exception if used.
For the second suggestion, I do not have any issue retrieving the variables and already have a call back function in place so it does not apply.
If you find anything else, please let me know. If I find the answer I will post it here.