Variable attachment not getting created in Attachment table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 08:16 AM
Hi ,
I created two variables of type 'Attachment' on a record producer and selected Map to field . I already created two File attachment fields on target table . The attachments are getting mapped to the field on Target table .
However these attachments are not seen in sys_attachment table .
I am trying to attach these fields to the Target record attachment in the header as per the below community link.But I am not seeing these records in with prefix zz_yy in attachment table .Please suggest.
https://community.servicenow.com/community?id=community_question&sys_id=41af7501db1ea010fa192183ca961983
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 08:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 07:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 07:44 PM
Hi Ankur,
After submitting record producer by uploading attachment using attachment variable, it is not creating any record in attachment table.
I already created the cross scope record but still getting same cross scope error when using the following script in Record producer script.
var gr = new GlideRecord('sys_attachment');
if (gr.get(producer.<variable_name>) || gr.get(producer.<variable_name>)){ //attachment field name
gr.table_name='sn_hr_le_case'; //copy to table name
gr.table_sys_id=current.sys_id;//copy to record sys_id
gr.insert();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 08:15 PM
Hi,
you created BR right? so it is in which scope?
Are you saying while submitting record producer when you add file it's not showing up?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader