- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi,
There is a record producer which have attachment as a variable when user submits the request the attachment is not showing at the top of the ticket instead it is showing only on variable tab.
Our requirement is the attachment should be visible on the top of the ticket as shown below.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
OOTB the file from attachment variable won't get copied to target record
you can use this in record producer script, I created blog for this
new global.VariableUtil().copyAttachment(producer.<variableName>,'<tableName>', current.sys_id);
Copying Attachments from a Record Producer's Attachment Variable to a Target Record in ServiceNow
💡 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
Monday
If you are using SP you can try:
1.- Navigate to your Record Producer.
2.- Under the Variables related list, click New.
3.- Set the Type to Attachment.
4.- Give it a Question/Name (e.g., "Upload your documents here").
5.- Use the Order field to give it a low number (e.g., 10 or 100).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Important Considerations
System Properties: Check the property glide.ui.attachment_position. By default, it is often set to "bottom".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
OOTB the file from attachment variable won't get copied to target record
you can use this in record producer script, I created blog for this
new global.VariableUtil().copyAttachment(producer.<variableName>,'<tableName>', current.sys_id);
Copying Attachments from a Record Producer's Attachment Variable to a Target Record in ServiceNow
💡 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
Monday
Hi @Ankur Bawiskar ,
The one which you shared is working fine the attachment was copied to record producer. But i can see the duplicates are getting created after submitting the request. Please find the screenshot
