- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2024 11:45 PM - edited ‎12-16-2024 01:23 AM
"This catalog client script is not VA supported due to the presence of the following variables in the script: setTimeout" is the information message I received when I was scripting for a client script.
setTimeout(function(){ g_form.clearMessages();},3000);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 01:51 AM
why not use GlideAjax in your client script and within the script include function give some 3 seconds delay?
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
‎12-16-2024 12:41 AM
What is your question? The message states what the issue is/could be. It's unclear what/why you are doing this, and because of that, we don't know what it is you want from us.
Is it really an issue (doesn't VA work correctly with this catalog item) or can't you save the script due to this error? Or are you writing it to work in VA like this?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 12:58 AM - edited ‎12-16-2024 12:58 AM
Here I was scripting to make the error message to get disappeared in 3 seconds. So for that I used the
script : g_form.addErrorMessage(" ");
setTimeout(function(){ g_form.clearMessages();},3000);
Like this setTimeout will not work. As it is showing "This catalog client script is not VA supported due to the presence of the following variables in the script: setTimeout".
Is there any other way to solve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 01:12 AM
the error clearly says that function is not supported in VA so you cannot use that
what's your business requirement to give timeout?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2024 01:24 AM
Here I was scripting to make the error message to get disappeared in 3 seconds. So for that I used the
script : g_form.addErrorMessage(" ");
setTimeout(function(){ g_form.clearMessages();},3000);
And it was not an error, it was showing as infoMessage.