Notifications

19 views

 

Description


How to hide "Add attachments" paperclip for a specific catalog item in Service Portal

Procedure


1. Navigate to the catalog item in which the "Add attachments" paperclip needs to be hidden
2. Create a new variable of type 'macro' to the specific catalog item
3. Navigate to Service Portal Configuration
4. Create a new Service Portal widget with the following codes in Client controller:

function() {
/* widget controller */
var c = this;
angular.element('label.ng-scope').hide(); 

//NOTE : The above line here is a JQuery selector inside the angular.element() which is supported in service portal, feel free to change this JQuery selector if you want the attachment element selection to be more specific. In the above code the element label and the class combination are used to hide the attachment
}

5. Add the widget to the Macro type variable created in step 2

Note: The solution is based on the following Community post and is not explicitly supported by ServiceNow

Applicable Versions


Any release supporting Service Portal

Additional Information


https://community.servicenow.com/community?id=community_question&sys_id=ec310be5db98dbc01dcaf3231f9619cb

Article Information

Last Updated:2018-11-19 20:03:37
Published:2018-11-20