- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:11 AM
I'm interested in learning more about advanced scripting in ServiceNow. Can anyone recommend resources or provide examples of complex scripting scenarios?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:21 AM
Introduction to ServiceNow Scripting and
Learn JavaScript on the Now Platform and
There's a course called Scripting in ServiceNow Fundamentals On Demand available on Now learning. You can access this for free with a partner portal account, or for some $ without one.
Regards,
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:21 AM
Introduction to ServiceNow Scripting and
Learn JavaScript on the Now Platform and
There's a course called Scripting in ServiceNow Fundamentals On Demand available on Now learning. You can access this for free with a partner portal account, or for some $ without one.
Regards,
Sid

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:38 AM
Hi @Abhinav_Ranjan ,
There are many sources to learn. Few are below:
- Youtube
- Youtube
Books:
- "Mastering ServiceNow Scripting" by Andrew Kindred.
- "Learning ServiceNow" by Tim Woodruff.
Scenario 1: Set a Field Value Based on Another Field
Objective: When a new incident is created, automatically set the priority field to '2 - High' if the category is 'Network'.
Scenario 2: Display an Alert on Form Load
Objective: Display a message to the user using an alert when a change request form is loaded, if the state is 'New'.
Scenario 3: Calculate and Display Age of Incident
Objective: Add a field to the incident form that calculates and displays the age of the incident in days from the opened_at date.
Scenario 4: Default Values in a New Record
Objective: When a new task record is created, automatically set the due_date to one week from the current date.
Scenario 5: Validate Email Format
Objective: Before a user record is saved, ensure that the email field contains a properly formatted email address.
Scenario 6: Prevent Deletion Based on Condition
Objective: Prevent the deletion of an incident if its state is 'Resolved' or 'Closed'.
Scenario 7: Send Notification on Record Update
Objective: Send an email notification to the assigned user whenever the priority of an incident is changed.
Scenario 8: Make Field Mandatory Based on Another Field
Objective: Make the sub_category field mandatory when the category field is set to 'Hardware'.
Scenario 9: Populate Caller Information
Objective: Automatically populate the caller_id field in an incident form based on the currently logged-in user.
Scenario 10: Auto-Close Incidents
Objective: Automatically close incidents that are in the 'Resolved' state for more than 7 days.
I started answering community questions recently. If my answer helped you in any way, please mark it as helpful or correct. It would be a great boost.