How to add attachment on the HR case using catalog attachment variable type?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 06:00 AM - edited ‎09-12-2023 06:53 AM
Hi,
Hope you are doing well.
I have an 'attachment' type variable in my record producer. When the user uploads any attachment, I want the attachment to get saved in the record created. But instead, it is hiding it.
I can see the entry created in sys_attachment but not on case,
How can I remove ZZ_YY before copying. I written this business rule
Async - insert. it's not working. can you help?
If I remove this zz_yy from sys_attachment manually from the table then it's adding the attachment on the case.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 07:52 AM
please update script line 10 as this
the function is copyAttachment and not copy
new global.VariableUtil().copyAttachment(gr.sys_id, current.getTableName(), current.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 08:07 PM
Hi,
Thanks for the quick response. But my criteria is still not met. This is copying the attachment over to the work notes of the case but I want it to be copied over to the case so that the fulfiller is able to view the attachment in the attachments section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 09:35 PM
the script you shared will copy the file from attachment variable to the record only and will show on the top in the attachment header.
can you share where you want it to be present?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 08:30 AM
Should I add when to run condition in the business rule?