Widget Customization
Widgets are reusable components built using a combination of HTML, CSS, client-side JavaScript, and server-side JavaScript. Base system widgets are read-only components that you can duplicate, modify, and customize as required for user experience and functionality.
Note
Duplicated widgets are classified as custom widgets and will not receive future updates. Updates will be received to the original widgets they were duplicated from.
To clone or create widgets, refer to Developing custom widgets in the ServiceNow documentation. To view and configure the instance options for a widget, refer to Configure widget instances in the ServiceNow documentation.
SPISCUIController Script
Widgets developed by SailPoint interact with the server-side using only one script include called SPISCUIController. The script include will accept input in a fixed format, perform actions as per the business logic, and return output in a fixed format. Ensuring that there is a known input and output will enable widgets to interact with this script include, allowing them to forget the server-side complexity and manage only the UI display and interactions. The user experience is dependent on the respective HTML page and portal theme, therefore, you must address any discrepancy that is found.
Widgets are rendered using these colors from the portal theme:
- brand-primary
- brand-danger
- brand-warning
- brand-success
- brand-info
Scripted Extension Points
SPISCUIController checks all implementation for a particular method and calls it from the specific script include. It uses a concept called Scripted Extension Point which allows for a high level of customization. For more information, reference Using scripted extension points in server-side scripts in the ServiceNow documentation.
The scripted extension points in the server-side script includes that store JavaScript functions and object classes. By using extension points, you can integrate customizations without altering the core components in the application code. You must create the scripted extension points and add them to the script includes in the base application code. When customizing a base application, you will implement the scripted extension points by creating the custom script includes and registering them against the scripted extension points.
When developing an application, create scripted extension points and add them to the script includes in the application code. Use a scripted extension point to designate the specific location where data or objects can be sent to a registered custom script include and where returned results are processed.
Perform the following steps to create a new implementation on the SailPoint widgets.
- Go to System Extension Points > Scripted Extension Point, and search for the
x_sap_intidn.ISCUIHandlerextension point. - Select the Create Implementation link from the form, and provide and appropriate name to the implementation.
- The
handles()method determines if this implementation handles the request from SPISCUIController. - Each implementation has a column
order. SPISCUIController first checks implementations with a lower value of the order field. If you have only one implementation that overwrites all the methods, you can create an implementation with anordervalue lower than 9999. - Ensure all the methods are appropriately defined. Each method will receive a fixed set of parameters from widgets, and widgets will expect a same set of return. Always refer to the SPISCDefaultUIHandler implementation to know the expected parameters and expected return of each method.
Documentation Feedback
Feedback is provided as an informational resource only and does not form part of SailPoint’s official product documentation. SailPoint does not warrant or make any guarantees about the feedback (including without limitation as to its accuracy, relevance, or reliability). All feedback is subject to the terms set forth at https://developer.sailpoint.com/discuss/tos.