Issue with File Attachment Field Navigating to Another Section

Vengadeshgiri
Tera Contributor

I have a form with two sections:

  • Section 1 contains a field of type File Attachment.
  • Section 2 contains two mandatory fields.

When a user uploads a file using the File Attachment field in Section 1, the file uploads successfully, but the form automatically refreshes/saves and navigates to Section 2 where the mandatory fields are located.

There are no Client Scripts, UI Policies, Business Rules, or customizations related to this behavior. The File Attachment field was simply added to the form.

Is this expected behavior for the File Attachment field type? If so, is there any way to prevent the form from automatically navigating to the section containing mandatory fields after the attachment is uploaded?

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron

@Vengadeshgiri 

No way to handle this as this is default OOTB behavior

If user uploads file and it's a new record, system saves the record and it becomes an existing record and you can see the sysId in the URL

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

View solution in original post

Tanushree Maiti
Tera Patron

Hi @Vengadeshgiri 

 

In ServiceNow, the auto-saving and refreshing behavior when a File Attachment field is populated happens because ServiceNow automatically commits the upload to the sys_attachment table, triggering a form reload.

It is expected OOB feature.

 

 

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron

@Vengadeshgiri 

No way to handle this as this is default OOTB behavior

If user uploads file and it's a new record, system saves the record and it becomes an existing record and you can see the sysId in the URL

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

@Ankur BawiskarIs he trying to perform this on the catalog item?

@Anshul Goyal 

as per question it's attachment type field and not variable

So it's not catalog item

Hi @Ankur Bawiskar @Tanushree Maiti 

 

Is there any way I can avoid this behaviour?

 

Regards

Vengadesh