Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2026 03:02 AM
Hi @VarshiniG ,
If Attachment variable related solution is not accpted, last option to
Create a onSubmit client script
Sample code:
function onSubmit() {
var sysIDrecord = g_form.getUniqueValue();
var validateAttach = new GlideRecord('sys_attachment');
validateAttach.addQuery('table_name', 'sc_cat_item_producer');
validateAttach.addQuery('table_sys_id', sysIDrecord);
validateAttach.query();
if (!validateAttach.next()) {
if (confirm('Please attach a document')) {
return false;
}
else {
return true;
}
}
}
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti