What Coding Language Does ServiceNow Use?
If you build on ServiceNow, you write JavaScript. It is the language for client scripts, business rules, script includes, scheduled jobs and scripted REST APIs. There is no second scripting language to learn.
Two different questions get mixed together here, so separate them now. The language you write on the platform is JavaScript. The language the platform product is built in is mainly Java, and you never touch that code as a customer developer.
| Layer | Language | What you write |
|---|---|---|
| Client scripts, UI actions | JavaScript | Form logic in the browser |
| Business rules, script includes | JavaScript | Server logic over records |
| Service Portal widgets | JavaScript, AngularJS, HTML, CSS | Portal pages |
| Old UI pages | Apache Jelly, an XML format | Legacy screens |
| Flow Designer, Workflow Editor | No code, with optional JavaScript steps | Automation without scripts |
| The platform product itself | Mainly Java, on a relational database | Nothing, this is ServiceNow code |
So the short answer is JavaScript, plus HTML and CSS for anything with a user interface.
Client-Side JavaScript
Client scripts run in the browser while a user fills in a form. They react to what the user does.
The four client script types are onLoad, onChange, onSubmit and onCellEdit. A common task is hiding a field until another field has a value.
g_form is the object you use for the form, and g_user for the current user. Keep client scripts small. Heavy client work makes forms feel slow.
Server-Side JavaScript and GlideRecord
Server scripts run in the instance and read or write records. Business rules fire before or after an insert, update or delete.
GlideRecord is the API you use to query the database. There is no SQL for you to write.
var gr = new GlideRecord('incident'); gr.addQuery('priority', 1); gr.query(); while (gr.next()) { gr.state = 2; gr.update(); }
Script includes hold reusable server functions. GlideAjax lets a client script call a script include instead of loading data it does not need.
Server-side JavaScript runs on a Java based engine inside the platform. Older global scripts follow an older JavaScript style with var and no arrow functions. Newer scoped applications can opt into a modern JavaScript mode, so check what your instance allows before using recent syntax.
Service Portal and Web Development
A Service Portal widget has three parts. There is an HTML template, a client script in JavaScript with AngularJS, and a server script in JavaScript.
Styling is CSS, usually written as SCSS. Scripted REST APIs are also JavaScript, and they let outside systems call your instance.
Does ServiceNow Require Coding?
No, not for every role, and this is why the question keeps coming back.
- A ServiceNow administrator can do most daily work with configuration, Flow Designer and the Workflow Editor. That work needs little or no script.
- A ServiceNow developer writes JavaScript every day. Business rules, integrations and custom applications all need it.
If you are aiming for developer roles, learn JavaScript properly first. Objects, arrays, callbacks and asynchronous calls all appear in real ServiceNow work.
What ServiceNow Is Written In
The platform itself is built mainly in Java and stores records in a relational database. That code is not exposed to customers.
This matters in one way only. It explains why server scripts feel like an older JavaScript dialect, and why you query with GlideRecord instead of SQL.
How to Prepare
- Learn plain JavaScript first. Practice arrays, objects and callbacks. Grokking the Coding Interview covers the problem patterns that interviewers use in any language.
- Write ten GlideRecord queries. Use a free personal developer instance. Query, update, and then add a condition with an encoded query string.
- Build one widget. It forces you to use all three layers at once: HTML, client script and server script.
- Know when not to script. Interviewers ask when a business rule should be a flow instead. The answer is whenever a flow can do it.
- Study the role questions. See ServiceNow developer interview questions and the top skills in ServiceNow.
- Learn the loop before you apply. Read what the ServiceNow interview process is like.

GET YOUR FREE
Coding Questions Catalog

$99

$197

$72