How restrict the attachment on the Sc task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 07:33 PM
Hello,
If I add one add attachment on the catalogue form in the portal. Multiple attachment is getting attached on the Sctask How to limit or restrict this ?
Currently I have created an After BR on sc_task table. And in advance
var attachment=new GlideSysAttachment();
attachment.copy('sc_req_item', current.request_item, 'sc_task', current.sys_id);
current.update();
Please help with some solution.
Thanks!!
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 08:21 PM
why are you using current.update() in your BR?
simply use these 2 lines
var attachment=new GlideSysAttachment();
attachment.copy('sc_req_item', current.request_item, 'sc_task', current.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader