Power of Scripting - JavaScript Use Cases
What is Scripting?
With new Scripting option available on all the pages of the SummitAI application (Alps), the Administrators can now write their own JavaScript, HTML, and CSS codes to customize the fields available on these pages.
SummitAI - Version
Scripting feature is introduced into the SummitAI application on few pages with the Alps release. This feature is now available on all the pages of the Application with Alps SP1 release. In the Alps release, the Admin could write JavaScript and CSS codes. With Alps SP1 release, the Administrators can write JavaScript, HTML, and CSS codes.
For more information about Scripting, see Scripting.
Why Scripting?
Scripting gives the power to the Administrators to write their own codes to make changes the way the organizations want.
The SummitAI R&D team can help the organizations in writing codes and can provide solutions to the customer requirements much faster instead of waiting for longer release cycles.
The JavaScript codes are executed only to the specific customer instance. No product code change is required eliminating the need to plan, develop, and test the changes.
The SummitAI team can focus on other customer requirements and product roadmap features instead of spending time on UI changes, which can be now easily achieved with Scripting.
Use Cases for JavaScript
How to Inspect Elements to Find Controls?
This section provides instructions to inspect an element in the following browsers:
Use Cases - Details
Following are the various use cases where SummitAI has leveraged on the Scripting functionality and delivered various customer customizations
Note:
Code samples are provided for few of the use cases. For the other JavaScript codes, please contact SummitAI Support.
Use Case #1: The Analyst should enter a business justification if the Change is not implemented as per the schedule
Page: Change > New Change Record
Prerequisite: Create a custom field called "Business Justification"
JavaScript Logic: If there is a difference between "Planned Start Date/ Planned End Date" and "Actual Start Date/ Actual End Date", the custom field "Business Justification" will become mandatory when the Change Record status is Implemented.
Use Case #2: When an Analyst logs an Incident for an End User, the Application should prompt if an open Incident exists for that user under the same Category. This would prevent the Analyst from creating duplicate Incidents for the same user .
Page: Incident > New Incident for User
JavaScript Logic: Based on the Caller and the Category of the Incident, validate if there is any open Incident for that Caller under the same Category. Display a popup, which indicates that there are open Incidents for that caller under the same Category. Display the Incident IDs in the popup.
Use Case #3: The 'Service Window' field on the Incident details page should be hidden for the Analysts. The Analysts should not change the Service Window of the Incidents.
Page: Incident > Incident List > Select Incident
JavaScript Logic: Disable (Freeze) the Service Window field if an Analyst has logged in.