- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 03:04 PM
I know this question must be pretty common, but I am not being able to get around it. I'm trying to make users attach a document on the initial form for a record producer and I found this on the community: https://community.servicenow.com/community?id=community_question&sys_id=ec764fe1db1cdbc01dcaf3231f96...
I can't make it work (of course, I placed my custom table instead of the one displayed on the code). My custom table is: u_procurement_request_pp
Solved! Go to Solution.
- Labels:
-
Best Practices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 09:32 PM
Actually, the post I mentioned works and most of the solutions suggested work. The reason why I was having trouble was because there is a hidden field on the client script from that should be disabled. That field is: "isolate script"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2021 07:51 PM
it worked just find, thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 10:35 PM
Hi samuelscott,
Can you try with below link its really helpful:
Kindly mark as a correct answer or helpful if it helps you to find your solution.
Thank You,
Ashvini k
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 10:13 AM
Hi Ashvini,
I've seen that post but there is to much fuzz about the portal and in my case, I'm not really using the portal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 11:57 PM
Hi Samuel,
Please find the below code:
This is a before insert business rule on incident table, you can customize it according to your criteria
(function executeRule(current, previous /*null when async*/) {
if(!current.hasAttachments()){
gs.addInfoMessage('Attachment mandatory');
current.setAbortAction(true);
}
})(current, previous);
Please mark the answer as correct if it suffice your query.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 10:15 AM
This won't work since I want the user to NOT be able to submit the form if an attachment is not being attached. "Before insert" is after the user submits the form, therefore, he/she won't be stopped/prompted.