- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 10:24 AM
Hi,
I have written catalog script and script include. While submitting form without checking attachment the form is getting submitted.
Screenshots of client script and Script Include is attached below:
Please help me where my code is getting wrong.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 11:01 AM
Just give me 10 minutes, I am doing corrections
Abhishek Gardade

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 10:30 AM
Hi there,
Since Madrid, there's out-of-the-box, a checkbox which makes Attachments mandatory on Catalog Items in the Service Portal.
I wrote an article on this. Have a look, it might help to achieve this without any scripting.
https://community.servicenow.com/community?id=community_article&sys_id=aff2e9ccdbc17300d82ffb2439961...
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 10:37 AM
I suggested her to check out your blog, But she wants to do with scripting.
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 10:35 AM
Hello Nidhi,
I can see you are posting same question again and again. Even you are not responding with issues on that.
Let it be,
Correct these in your script:
IN your code, LINE number 5, attachment should be in quote like "attachment "
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2019 10:41 AM
2.Also your script include is INACTIVE:
3. Alert wont work in server side scripts like business rule, script include. so add gs.log or gs.addInfoMessage()
Thanks,
Abhishek
Abhishek Gardade