
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2016 07:44 PM
On insert or update of the form, if the field "submission_type" is "Client Change Request" I need the user to attach a document before being allowed to submit the form. Any ideas on how I can accomplish this? Examples will be great.
Thanks,
Edwin
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2016 08:41 PM
I believe hasAttachmensts() is not allowed in scope applications. Then remove the conditions and use this in the script
var gr= new GlideRecord('sys_attachment');
gr.addQuery('table_sys_id',current.getValue('sys_id'));
gr.query();
if(!gr.hasNext()){
gs.addErrorMessage("No attachments");
current.setAbortAction(true);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2016 08:55 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2016 08:56 PM
Yes. This is caused by current.setAbortAction(true) statement.