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

6 REPLIES 6

Jorge Herrera2
Tera Contributor

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).

Jorge Herrera2
Tera Contributor

Important Considerations
System Properties: Check the property glide.ui.attachment_position. By default, it is often set to "bottom".

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

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