- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited 2 weeks ago
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
a week ago
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
a week ago - last edited a week ago
@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
a week ago
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
a week ago
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
a week ago
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
a week ago - last edited a week ago
Yes, I did adapt the script @Rakesh_M
And it looks like this in my instance:
But still that error message comes.
