How to hide attachments in a ServiceNow Form

This blog was originally published by Fruition Partners. Since then, Fruition Partners has become the ServiceNow practice within DXC Technology.

In some cases it might be necessary to hide certain attachments in ServiceNow, e.g. when it is confidential information or personal data. In this Tips & Tricks we show you how to easily hide attachments in a form.

Imagine the following situation: You have a request for a mobile phone, and in order to process it you’ll need personal information as attachment (e.g. : ID, bank account details). It is important that except from the concerned people, nobody else must see it.

Example of a ServiceNow form with an attachment

Example of a form containing ID Card in attachment. Everybody who has access to the form can see it.

Follow the two steps below to hide sensitive attachments:

1) Create a new role in ServiceNow. Only people who have to see these attachments, will have the role.

Menu in ServiceNow to access to Roles

Menu in ServiceNow to access to Roles

2) Create a OnLoad client script which uses the role

NOTE : The following script will be applied on every form of the table you selected for the script. To apply it on a particular situation, you just need to add another « If » condition.

Script :

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: