Button is throwing an error in ATF : Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
21m ago
Hi all,
I am creating ATF for change management for custom use cases when i am clicking an Request Approval button it is giving me an error after clicking the button. attaching screenshot for reference.
any solution ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 seconds ago
Hi @Devansh00 ,
In your ATF script , somewhere you have used replace() function which is not supported by Servicenow.
The error "Cannot read properties of null (reading 'replace')" occurs when your ServiceNow client-side code executes a .replace() string function on a variable or field that contains no data or evaluates to null
For example:
var value = null;
var result = value.replace("old", "new");
Change the replace() by some supported function .
You ca share the code snippet as well .
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti