[ForYourInformation -35] Page Scripts

[ForYourInformation -35] Page Scripts

The UI of ServiceDesk Plus is built over the hundreds of js and CSS contents. Every element/content that you see in the UI is a part of these js files. Wouldn't it be nice if you can customize the UI based on your needs? Would you believe that if you can customize the UI with your scripts? 

The Page Scripts option is one of the enhancements that was released in the 11100 builds of the application. With Page Scripts in place, you can customize the UI to suit your business needs. 

Where to access this from? 

The page script option can be accessed from Admin > Page Scripts under "General Settings" section 

What does the Page Scripts offer? 

The Page Scripts offers a UI based configuration where you can create rules based on certain criteria and execute a script. Out of the box, the application offers the below functionality. 
  • You can show or hide UI elements like Edit, Assign, Actions, etc
  • You can create a new button on the UI and redirect it to third party application or any specific template or a module
  • You can add widgets from the External world
  • You can hide the unanswered fields 

Apart from the above-listed functionalities, the application allows the user to configure their own scripts. 

Let us see some use case scenario on using the page scripts 

A. Showing/Hiding elements 

As a part of the workflow, you may not need the technicians to edit the request once it is approved. In that case, we can hide the edit button on the request details page.
Approval Status is Pending

Approval Status is Approved
B. Hiding unanswered fields 

With this function, you can hide the unanswered field which in turn changes the clumsy request details page to show only the fields that are answered. 

This allows the user to find what they are looking for at ease. 

Before Script
After Script
C. Adding Button 

Apart from the available buttons like Edit, Assign, etc, you can add a new button and redirect it load any URL within the application or to the external URL. 

The application does have a Bootstrap Plugin integrated that would allow you to design the button based on your requirements. 


New button in UI to redirect to Company's Policy
D. Adding a Widget 

With the default option available, we can add a widget which can be a URL or an HTML content. 


Widget created using HTML to show the Workflow

Widget created using HTML to show report from Analytics Plus

With Concurrent view license for Analytics Plus, you can display a report from Analytics Plus as a Widget using Page Scripts 

With Page Script functionality, you can modify any page within the application. To make sure that the page script is executed only for a certain page, you can create a script with the IF condition as mentioned below: 

if(window.location.href.indexOf("WorkOrder.do?")!=-1){ 
$CS.hideElement("edit"); 


Please feel free to contact us in case of any customization and we will be more than happy to help you. 



                New to ADSelfService Plus?