- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2026 02:39 AM - edited 04-24-2026 02:47 AM
Hey!
In a record producer I have a custom variable of type attachment called 'bifoga_fil':
So I want to copy this to the OOTB attachment on the record producer in the back-end, so that the attachment is visible in the banner above and in the logs.
I've marked what I mean with red.
So, I am thinking an after insert business rule of some kind? What would that look like?
I'm thankful for your help.
All good,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2026 02:43 AM
the file should get attached to the record if you used the record producer script
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2026 07:29 AM - edited 04-28-2026 07:29 AM
@Ankur Bawiskar The record producer creates recors on x_vgll_rail_request (child table of x_vgll_rail_task). But it still only puts the attachment in the banner I realised, and not in the log section. I want it to be put in the log section as well.
When I change to the parent table, then it maps to only the log, and not to the banner. So it's either or..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2026 08:38 AM
it worked for me, I created record producer on incident which is child of task table
It copied and added message to log as well
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2026 01:20 AM
HI @ronro2 ,
open sys_attachment table record and under Application Access
1.Accessible from =All application scopes
2.check Can Create and save.
You can also use the script as mentioned by @Ankur Bawiskar ,which is OOTB
new global.VariableUtil().copyAttachment(producer.<variableName>,'<tableName>', current.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2026 03:39 AM
HI @ronro2 ,
Just a quick check—did you define attach_sysid like this?
var attach_sysid = producer.bifoga_fil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2026 07:00 AM - edited 04-28-2026 07:01 AM
Yes, I did adapt the script @Rakesh_M
And it looks like this in my instance:
But still that error message comes.