onChange script error: RangeError: Maximum call stack size exceeded function () { [native code] }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 12:15 AM
When the sample number field is filled, Escalation Manager should auto populate based on the sample number field values. The sample number has different managers and it is stored in sample_data_1 table. I have written a script include and on change client script to populate the value based on the sample number selection but its not working.
Errors which I'm facing for this script:
1. onChange script error: RangeError: Maximum call stack size exceeded function () { [native code] }
2. The escalation manager field is auto populating for a while and getting vanished.
3. If the sample data is filled and changed, the escalation manager value is not populating.
Script Include:
On change client script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 01:31 AM
Hi @Ankur Bawiskar , You're right it's a scoped application and both script include, client script in the same scope.
My on-change client script is partially working which means the escalation manager field is auto populating for few seconds and getting vanished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 01:59 AM
Did you check this?
Seems your client script is setting "escalation_manager" which in turn is triggering another client script and hence it's causing some recursion
did you check that?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 06:03 AM
Hi @Mahalakshmi Rav ,
In Client script you are calling "EscalationManagerUtil" Script Include and above screenshot is of TerritoryManagerUtil() script include. Just cross check which one you want to call and also see if "EscalationManagerUtil" is client callable if this is the script include you wish to call from Client Script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 01:28 AM
Hi @Rohit Singh ,
I was replicating the scenario on my PDI and I double-checked that the "EscalationManagerUtil" Script Include is being called and it's client callable.