client callable script include not working in scoped application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 12:20 PM
Hi everyone,
I'm working on a custom table inside scoped application, and I'm trying to execute an OnSubmit client script which calls script include (defined in same scope), but so far.. either I got null response or no response at all. below are my scripts which are pretty simple but not behaving as expected. basically Im trying to make attachment mandatory on form.
client script:
script include:
have referred multiple community articles and solved queries, nothing seem to work. "sys_attachment" is made available to all scopes.
Regards,
Ubada Barmawar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 12:45 PM
Hi @Ubada Barmawar,
Note that onSubmit Client Sscript does not work with AJAX - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0783579
There may be nothing wrong with your script, try printing out some logs in the Script Include to check its functionalities.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 09:50 PM
Below posts could be helpful :
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 08:56 AM
sorry to say, but its not working out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2024 09:04 AM
In the client script you are calling 'hasAttachment' but your script include function name is 'hasAttachments'... 's' is missing in the client script.