IT CanvassTalk to an advisor
ServiceNow Cheat Sheets · LessonBy , ServiceNow Trainer, 8 yrs · Published · Updated · current release · reference

ServiceNow Scripting cheat sheet

Client vs server context and the objects you use.

Quick answer

Know where your code runs and which objects are available.

Key takeaways
  • Server side
  • Client side
  • Rule of thumb

Know where your code runs and which objects are available.

Server side

  • gs, logging, user, utilities.
  • GlideRecord, database access.
  • current / previous, in business rules.

Client side

  • g_form, read/write fields on the form.
  • g_user, current user info.
  • GlideAjax, call the server.

Rule of thumb

Security and data integrity belong on the server. The client is only for UX.

Quick check

+0 XPStreak ×0
Question 1 of 2
Which object edits fields on a form?
Practise this on your own free instance.
Set up your free instance →
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support