Record producer attachments should be visible on table record.

Bindu Jayagond
Tera Contributor

Hello,

 

I have created a record producer which holds more than 3 variable type as attachment.

When we submit the form, a record is created I want all the attached documents in record producer should be visible on the table record.

 

Can someone please help me with this.

Thank you.

 

3 REPLIES 3

Basheer
Mega Sage

Hi @Bindu Jayagond ,

Follow the below link 

 

https://www.servicenow.com/community/developer-forum/mapping-attachment-data-from-the-record-produce....

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

Mohith Devatte
Tera Sage
Tera Sage

Hello @Bindu Jayagond ,

try this in record producer script 

var gr  =  new GlideRecord('sys_attachment');

gr.addQuery('sys_id',producer.your_attachment_field_backend_name);

gr.query();

if(gr.next())

{

gr.table_sys_id = current.sys_id;

gr.update();

}

 

Hope this helps 

Mark my answer correct if this helps you 

Thanks

shloke04
Kilo Patron

Hi @Bindu Jayagond 

 

By default, those attachments which you have uploaded using Attachment button are available on the record itself in Activity feed as shown below:

shloke04_0-1674552067671.png

 

shloke04_1-1674552094837.png

 

 

This is what you need right? If the use case is different do respond back and will try to help you here.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke