Learn why current.isNew() isn’t a valid ServiceNow call. This note covers server-side checks with GlideRecord isNewRecord(), client-side checks with g_form.isNewRecord(), and why API names must be used exactly. It links to CAD training concepts and common scripting pitfalls.

Multiple Choice

Which statement about current.isNew() is accurate according to the material?

When you need to check if a record is new, you must use the correct API name. For server-side scripts, the GlideRecord method isNewRecord() tells you whether the record has not yet been inserted. There is no isNew() function on current, so current.isNew() isn’t a valid call. The idea behind this is that API names are specific and must be used exactly as implemented; a misnamed function won’t exist and won’t work. If you’re in a client-side context, you’d use g_form.isNewRecord() to detect a new, unsaved form, but current.isNew() itself has no place in either environment. Therefore saying that current.isNew() is accurate isn’t correct.

On the ServiceNow journey, little API quirks show up and trip people up just enough to make you pause, smile, and rethink. One of those quirks is the idea, sometimes, that a method called isNew exists on the current object. Spoiler: it doesn’t. If you’ve ever tried current.isNew(), you’re not alone—and you’re not out of luck, either. You’re simply in the land where API names matter, and exact matches save you hours of debugging later.

Let’s untangle what “new” means in ServiceNow, because the distinction matters once you start building real, useful behavior into workflows, forms, and business logic.

The core idea: what “new” means in different contexts

In ServiceNow, there are two big contexts where you often check whether something is new or not:

  • Server-side scripts that work with records fetched or created via GlideRecord.

  • Client-side scripts and forms that know whether the user has opened a brand-new form for a new record.

Each context has its own reliable way to determine “newness.” The common thread is this: you don’t rely on a single universal function that claims to tell you if any given record is new across all contexts. Instead, you use the API designed for that context and object.

Server-side reality: isNewRecord() on GlideRecord

When you’re writing server-side code, the GlideRecord object is your friend. GlideRecord has a method called isNewRecord(). This method tells you whether the GlideRecord you’re looking at has not yet been inserted into the database. It’s a precise, built-in signal:

  • If you just created a new GlideRecord instance and haven’t called insert(), isNewRecord() returns true.

  • If you’ve retrieved a record from the database (or if you’ve inserted it already in this server-side flow) and you’re working with that persisted record, isNewRecord() returns false.

This distinction is important because it affects how you initialize fields, decide whether to run certain business rules, or trigger post-insert logic. It’s the kind of control you want when you’re stitching together data integrity checks, dependent lookups, or conditional history tracking.

Client-side reality: g_form.isNewRecord() on forms

Move to the client, and the landscape shifts again. The form API on the client side has its own method: g_form.isNewRecord(). This tells you that the user is looking at a new, unsaved form. It’s a quick, practical way to tailor the UI and behavior: you might hide certain fields, set default values, or alter validation rules when you know the record hasn’t been saved yet.

The key takeaway here is that client-side logic leverages g_form.isNewRecord(), while server-side logic uses GlideRecord.isNewRecord(). They sound similar, they’re both about “newness,” but they live in different spaces and don’t cross over.

Why current.isNew() isn’t a thing you can rely on

Now, where does current come into this story? The current object in ServiceNow represents the record that a script is operating on at that moment. It’s the star of many server-side scripts, especially business rules, script actions, and server-side UI actions. The catch is that current’s API is not a catch-all toolbox. There is no isNew() function on current. If you try to call current.isNew(), you’re asking the platform to run a function that simply isn’t defined for that object.

So what happens if you try it? In most environments, you’ll get a JavaScript error: current.isNew is not a function (or similar). And that’s not because you’re “close,” but because you’ve used a misnamed or non-existent API. It’s a classic case where a guess—well-meaning, perhaps—fails because the API surface is stricter than it appears at first glance.

The practical upshot: don’t rely on isNew() on current

  • It’s not valid in any supported context.

  • Even if you search for a “natural” fit, you’ll encounter a lot of friction or confusing errors.

  • The right approach is to use the dedicated API for your context: GlideRecord.isNewRecord() on the server, or g_form.isNewRecord() on the client.

A few common scenarios to ground this in reality

  1. When you’re creating a new incident from a form and you want to prefill fields only on the first save
  • Client-side approach: check g_form.isNewRecord() to decide whether to prefill or lock certain fields, or to trigger a one-time helper banner.

  • If you later submit and save, a server-side rule or script can then reference isNewRecord() on the GlideRecord after you’ve saved or during an insert operation to further enforce business logic.

  1. When you’re populating defaults in a new record versus updating an existing one
  • Client-side: use g_form.isNewRecord() to decide whether to fill in placeholder values that make sense for a new ticket or task.

  • Server-side: in a business rule, verify whether gr.isNewRecord() on the GlideRecord, and then apply server-side defaults or validations accordingly.

  1. When you’re running a background process that processes multiple records
  • Rely on GlideRecord.isNewRecord() to understand which rows have just been created in the current execution context, especially if you’re pushing data into related tables or triggering after-insert workflows.

Best practices: building reliable, readable code

  • Be explicit about context. If you’re on the server, use GlideRecord.isNewRecord(). If you’re on the client, use g_form.isNewRecord(). It might seem a bit verbose, but it creates clarity and reduces debugging time later.

  • Name your variables thoughtfully. If you’re checking newness, a variable name like isNew, isFresh, or isBrandNew can help, but avoid mixing contexts. Keep server-side checks separate from client-side logic.

  • Document your assumptions. A short comment explaining why a particular path happens only on new records helps future you or teammates.

  • Test in realistic flows. Create a new record, save it, refresh, and then edit to confirm the new-record behavior bucks off gracefully. Do the same for updates to verify the isNew logic doesn’t mistakenly apply to existing data.

  • Keep an eye on governance. If your organization has strict data integrity rules or audit trails, leveraging the correct isNew pattern ensures you’re not duplicating entries or skipping essential post-insert steps.

A gentle analogy to keep it human

Think of it like buying a house. The front door key works in the door you own in real life, not in the door of a house you haven’t purchased yet. On the server, you’ve already got a key that fits the new-record door (isNewRecord on GlideRecord). On the client, you’re looking at a staged, empty house that hasn’t been signed off yet (g_form.isNewRecord). current.isNew() would be like trying to use a universal key that isn’t cut to fit any real door in your neighborhood—nice in concept, but it just doesn’t exist in the lock system.

A few practical pointers to keep handy

  • If the question of newness crops up in your workflow, always trace it back to the right API: GlideRecord.isNewRecord() for server scripts, g_form.isNewRecord() for client scripts.

  • Don’t overengineer “newness” checks. Most of the time, a simple isNewRecord() call is enough, and you can keep your logic straightforward.

  • When collaborating with teammates, share a small cheat sheet: “Server: gr.isNewRecord(); Client: g_form.isNewRecord().” It saves a lot of “Wait, what did you call again?” conversations.

  • If you’re curious about edge cases, consider what happens in asynchronous flows where a record is created in one process and later manipulated in another. The timing of isNewRecord() can matter, so keep your sequence diagrams clear.

A touch of curiosity: where the nuance lives

The service landscape loves its layers. Server-side and client-side ecosystems exist for good reasons: performance, security, and clarity. The separation isn’t arbitrary; it’s a design choice that helps keep data integrity intact while delivering responsive experiences to users. The “new” state is one of those subtly different things that behaves predictably when you honor the boundaries. When you do, you avoid unnecessary debugging tangles and you build systems that feel reliable, almost intuitive.

If you’re building CAD-powered experiences in ServiceNow, the takeaway is simple: don’t chase a non-existent current.isNew(). Embrace the right tool for the right job, and your code becomes not just correct, but pleasantly readable—like a well-written note in a well-kept notebook. And that clarity? It pays off every time you come back to refine a process, add a new feature, or collaborate with someone who’s just stepping into the platform.

A final thought about momentum and learning

Cadence matters in training, and so does the small, practical wisdom that comes from hands-on work. The moment you realize that APIs sit in their own lanes, you start writing cleaner, more maintainable code. You start thinking in modules instead of monoliths. You begin to see patterns—server vs. client, insertion vs. update, new vs. existing—that show you where you want to push a feature next.

If this topic sparks a question in your mind, you’re not alone. It’s exactly the kind of nuance that makes ServiceNow feel alive: a sturdy toolkit with a few misfit knobs until you know where to turn. And once you do, the ride becomes smoother, a little faster, and a lot more satisfying. The platform isn’t just about ticking boxes; it’s about shaping behavior that makes work feel a little more effortless every day.