Loading...
Loading...
Catalog UI policy containing g_form.clearValue() script on a multi-row variable set breaks a form for user with only read-only access to the record
Setup an environment where user only has read-only access to the incident record: 1. create a role, test_role 2. create a user with only test_role, Test User 3. create a read ACL on the incident table with role, test_role 4. open an incident record to add the Incident Variable Editor into the Self Service view and make [incident query] business rule inactive
1. create a record producer on the incident table and click Save: Name - Test MRVS Table - incident Redirect To - Generated Task Record 2. add a Multi-Row Variable Set and click Save: Title - An MRVS Internal name - u_an_mrvs Order - 100 3. in "An MRVS", created in step 2, add a variable and click Submit: Type: Single Line Text Question - Q1 Name - u_q1 4. add a catalog UI policy to the record producer created in step 1: Short Description - Test Clear MRVS Applies on the Target Record - checked Run scripts - checked Execute if true - g_form.clearValue('u_an_mrvs'); 5. navigate back to the Test MRVS record producer and click Try it 6. add a row and click submit 7. in the created incident, fill out caller and short description and save the record 8. impersonate Test User 9. navigate to the created incident from step 6 expected behavior: the form loads correctly actual behavior: the form is broken (right click on the context menu and nothing is shown), error in the console logs: Uncaught TypeError: Cannot set properties of null (setting 'disabled') at e.clearValue (js_includes_table_variable.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:235) at e.setValue (js_includes_table_variable.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:239) at e.secretSetValue (js_includes_catalog.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:4451) at e.setValue (js_includes_catalog.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:4364) at e.clearValue (js_includes_catalog.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:2696) at e.clearValue (js_includes_doctype.jsx?v=11-04-2021_1000&lp=Thu_Nov_04_18_23_50_PDT_2021&c=10_458:9507) at onCondition_34e2a33a1b67b010178aed72604bcbbb_true (incident.do?sys_id=41e5a3fa1ba7b010178aed72604bcbaa&sysparm_view=ess:1198) at eval (eval at _runScript (ui_policy.jsx?v=11-04-2021_1000:620), <anonymous>:1:1) at e._runScript (ui_policy.jsx?v=11-04-2021_1000:620) at e.runActions (ui_policy.jsx?v=11-04-2021_1000:592)
This problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this article to be notified when more information becomes available.
PRB1538077
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.