Agent Workspace Attachment dialog window

Efren T_ Marti1
Tera Expert

Hi All,

 

Does anyone know of a way to disable the Upload a file dialog box in agent workspace when you click on browse? We do not want users to be able to rename the file they are uploading.

EfrenT_Marti1_0-1678482521198.png

 

5 REPLIES 5

Syedmd08
Kilo Guru

To disable the Upload a file dialog box in Agent Workspace in ServiceNow, you can modify the UI Action for the "Browse" button on the form where you want to disable it. Here are the steps you can follow:

  1. Open the form where you want to disable the Upload a file dialog box.
  2. Click on the gear icon on the top right corner and select "Configure Form Layout".
  3. Click on the "UI Actions" tab.
  4. Search for the "Browse" UI Action and click on it to edit it.
  5. In the script field, replace the code with the following:

function browseForAttachment() {
var input = document.getElementById('file'); // replace 'file' with the ID of the file input field
input.click();
}

 

  1. Save the UI Action.

This code replaces the default behavior of the "Browse" button with a function that programmatically clicks the file input field instead of opening the Upload a file dialog box. This way, users will not be able to rename the file they are uploading.

Note: Before modifying any ServiceNow configuration, it is recommended that you test the changes in a non-production environment to ensure that they work as expected and do not cause any issues.

 

Please mark my reply as Helpful and/or Accept Solution, if applicable. Thanks!

No luck so far. If i go to the ui actions on the hr case table in this example, there is no ui action named browse and if i search all tables none that are related to attachment.

EfrenT_Marti1_0-1678839995856.png

 

 

TomSNOW221
Tera Contributor

did you manage to solve this? I would like to disable this windows aswell

rahulbastawade
Tera Contributor

Hi @Efren T_ Marti1 ,

 

Were you able to solve this! I have a similar requirement