Attachment is not getting added from record producer to custom table record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 11:20 PM
Hi experts,
I have created a record producer where I have added a variable of type 'Attachment'. I'm able to add attachments in the record producer but I'm unable to get that attachment in my custom table records.
Does anyone know what is the cause behind this?
I've created a custom table to get the records created by that record producer.
Please let me know what is the root cause and solution to this issue.
As you can see, I can add an attachment in the record producer but unable to see it in the custom table records.
Thanks in advance!
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 11:29 PM
Hi,
Please check this community post. It could be helpful.
Regards,
Karthik Nagaramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 03:01 AM
Hi @Ankur Bawiskar,
Could you please help me with my scenario?
I want to see attachments in header menu.
Thanks in advance,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 03:12 AM
this should help
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here "ZZ_YY"
var gr = new GlideRecord("sys_attachment");
gr.addQuery("x_infte_intellectu_brandname_clearance", "ZZ_YY" + current.getTableName());
gr.addQuery("ca954dd0c3f83d102f7798bc7a013179", current.sys_id);
gr.query();
if (gr.next()) {
gr.table_name = current.getTableName();
gr.update();
new global.VariableUtil().copyAttachment(gr.sys_id, current.getTableName(), current.sys_id);
}
})(current, previous);
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-01-2023 05:16 AM