Attachment should be visible in incident form under manage attachment

Surekha Nalla
Tera Contributor

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

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Surekha Nalla 

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! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

@Surekha Nalla 

the record producer script will work only once and copy the file from variable to target record.

any other logic is adding the file again?

what debugging did you do?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

 

I have tested the record producer in PDI it is the similar behavior. Is it an OOB functionality.

I have attached the document 

@Surekha Nalla 

yes that's OOTB behavior

I believe the 1st one comes because of the attachment variable and 2nd one comes because the script copied the file

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Is there any other way to show only one attachment in work area.

@Surekha Nalla 

I think you will have to explore some custom solutions

I haven't thought so can't help right now

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader