Unable to make custom variable editor mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2017 06:30 PM
Hi All,
We are having an issue with making fields of a custom variable editor Readonly. could you please help us in resolving it.
Issue:
We have built a custom table(x_ct_request) in our scoped application, this table extends task table.We are using SM variable editor (Global scope) which picks all the variables from the record producers and displays them on (x_ct_request) table. Now we need to make the fields on this variable editor mandatory.
Approach:1:-
I have written an on display Business rule to get all the variable editor fields in g_scratchpad and then tried to make them read only using a client script.
but i am getting an error saying "ReadOnly true not set on field variables.check_status: cross-scope access denied.".
The table on which this business rule and client script are executing are in same application scope i.e. custom application scope.
Approach:2:-
I have written a simple client script statement " g_form.setVariablesReadOnly(true);" bu this doesnt work as well.
When i alert with g_form.getValue('variables.variable_name'); i get the correct value in alert but it doesn't set to readonly I get the same error ("ReadOnly true not set on field variables.check_status: cross-scope access denied.").
Should I create a record in application cross scope access table. If yes should i create it for the formatter table or only for the formatter which is used as variable editor.
Please suggest me a correct approach if i am going wrong.
Waiting for your reply.
Thanks and Regards,
Zabeeulla.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2017 07:53 PM
In one of our instances, the variable editor in SP was completely broken.
This may be unrelated though. Maybe have a read of https://hi.service-now.com/kb_view.do?sysparm_article=KB0621064
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2017 10:03 PM
Hi paul,
I can modify in variable editor widget by adding readonly conditions.
But this will not be a consistent solution right?
We are following 2 different process for 2 UI's.
Regards,
Zabeeulla.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2022 08:57 AM
Hello Zabeeulla,
Were you able to find solution to the issue? If so could you please provide the steps you have followed to eliminate the issue?
Thanks & Regards,
Bhavana Lanka.