How to find the root cause for form which is broken in prod after making changes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2022 07:54 PM
Incident is assigned to me with high priority so that form is broken in prod after making changes. Incident is creating to find the root cause.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2022 09:07 PM
Hi,
Couple of things to take care in this scenario, there can be multiple reason for the form to be broken, I am listing down few of them which you need to try and should work for you:
Approach 1:
Cause
There is a console error that prevents the form from fully rendering which causes the behavior. In this case, the error was "Uncaught TypeError: Cannot set property 'length' of null"
Usually, the error is caused by a UI Policy or Client Script on the table
Resolution
Review the error to identify the record that is breaking the form. In this case, the error had the below information.
Uncaught TypeError: Cannot set property 'length' of null
at onCondition_4ddd3d854f071200bf6176601310c733_false
The above error provided a sys_id, this sys_id point to a Catalog UI Policy
Review this record and make the necessary changes to address the error.
Approach 2:
The issue is due to a form section deleted from sys_ui_section, but its reference in sys_ui_form_section still exists. The fix is to navigate to the sys_ui_form_section record and delete the entry.
Restore the missing links within the form sections for the specific table where the issue is occurring:
- Navigate to Forms.
- Filter for the wanted Table and View that are showing the form sections visibility issue.
- Click the Table name to open the form sections definitions.
- Click the Position number to drill down on the individual Form Section detail.
- Point to the reference icon on the Sys UI section field.
- If it states None Available, delete that one or restore it to the wanted section, if known.
For example, from a sibling instance, this can be done by clicking on the magnifying lens and picking the wanted form section from the related list.
Right-clicking and selecting Show XML also helps determine if the referenced form section is valid, showing an existing sys_id. For example:
<sys_ui_form display_value="incident">991f87290a0006414b6521d3fa9b4176</sys_ui_form><sys_ui_section display_value="Notes">991f88d20a00064127420bc37824d385</sys_ui_section>
If the referenced form section sys_id is unknown or missing, find the parent form section sys_id and compare the same record within a sibling instance, when available. - Flush the instance cache.
- Review or delete the original Update Set that might still contain the invalid form sections linking.
Refer to the below HI article if above two approach does not work:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0550574
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0634434
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2022 11:25 PM
Hi there,
You are one of the ServiceNow System Administrators within the company then I guess?
How do you handle your incidents in general? Start with that. For example, do you have steps to reproduce, since when is it happening, what changed, etc.. If something changed, look at what exactly, how is it behaving on other instances, etc..
Maybe this helps also:
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field