ServiceNow CAD - Certified Application Developer - Scripting APIs Flow Designer Testing UI Builder

By Marcus Chen · Updated May 25, 2026

Questions25
Passing Score75%
Format100% Multiple Choice
Sessions Logged1,104
Your progressLog in / Register to track times taken, best score, questions mastered, and coverage on this quiz.
Rating
Community rating 4.3 out of 5 from 43 ratings.
4.3 (43)

Topics covered

This quiz

Uncategorized25 (100%)

Uncategorized25 questions

Discussion

Log in to post a comment, reply, or expand a question.

Q-8445

Question Q-8445 A developer needs to handle an error in a Flow…

2 comments · last active Jun 5, 2026

  • abnormalyetnormal · Apr 27, 1:14 AM

    Flow Designer Error Handler on the flow — not JavaScript try/catch. Log to table + notification on Invoke REST Message failure is the native pattern.

  • throwitallaway200 · Jun 5, 6:57 PM

    Orlando/Paris added this — if your study material is old, update it. Business rule fallback works but isn't 'native' FD error handling.

Q-8443

Question Q-8443 A developer notices that their scoped application's Script Include is…

2 comments · last active May 21, 2026

  • MBSUPERSPAZZ · Apr 25, 10:36 PM

    Scoped app can't read another scope's table without Cross-Scope Access Policy granting read (or write/execute as needed). Roles are evaluated after scope check.

    +2 votes
  • whoframed · May 21, 2:55 AM

    Fixed ours in Studio → Application → Manage Cross-Scope Access. Took longer to find than to configure.

Q-8458

Question Q-8458 A developer wants to create a custom component for the…

2 comments · last active May 12, 2026

  • Vercingetorisk · May 11, 1:09 AM

    Component SDK = snabbdom + @servicenow/ui-core, createCustomElement(), h() render — NOT React/Angular/Vue despite the vibe.

  • watch444snakes · May 12, 8:09 AM

    snc-ui-component CLI deploy path is part of CAD advanced track — worth lab time if you've only done classic UI16 widgets.

Q-8446

Question Q-8446 A developer is creating a custom REST API endpoint in…

2 comments · last active May 12, 2026

  • tartcap78 · May 11, 4:44 PM

    Scripted REST: setContentType application/json then setBody(JSON.stringify(array)). setBody does NOT auto-serialize objects — learned that debugging a 500.

  • Discomfitting_SOB · May 12, 12:44 AM

    Outbound REST from a Scripted REST resource is backwards — inbound receives, outbound calls external.

Q-8460

Question Q-8460 A developer creates a GlideRecord query in a Business Rule…

3 comments · last active May 11, 2026

  • granko · May 10, 12:51 PM

    setLimit(1) when you only need existence check — adds SQL LIMIT, doesn't just hide rows in UI. Huge perf win on incident tables.

  • isimi · May 10, 7:51 PM

    Deprecated distractor is nonsense — we use setLimit daily in integration scripts.

  • notorioususb · May 11, 3:51 PM

    10 second timeout option confused me until I remembered LIMIT vs query timeout are different knobs.

Q-8455

Question Q-8455 A developer needs to implement an integration where ServiceNow receives…

2 comments · last active May 11, 2026

  • Shoulditeachphysed · May 10, 6:23 AM

    GitHub webhook → Scripted REST POST endpoint → parse body → sn_fd.FlowAPI.startAsync or event. Polling GitHub every minute is lazy architecture.

  • J_g_alt · May 11, 6:23 AM

    Email inbound for structured PR payloads is fragile — REST receiver is the right integration point.

Q-8449

Question Q-8449 A developer is using ATF to test a client script…

3 comments · last active May 9, 2026

  • HappinessWarmGun · May 8, 3:13 AM

    Client script mandatory behavior = UI test ATF (Set Field Values → Assert Field Mandatory). Server-side record create won't fire onChange client logic.

  • Madrascalcutta · May 8, 3:13 PM

    Service Portal test type is wrong UI — that's not the standard platform form ATF path.

  • Higher_Res_Bot · May 9, 8:13 PM

    Browser-based ATF is slower but mandatory for g_form / UI Policy interactions.

Q-8439

Question Q-8439 A developer is writing a GlideRecord script to find all…

3 comments · last active May 7, 2026

  • lukeskywalker172 · Apr 26, 4:09 PM

    Option A queries ALL incidents then filters in JS — brutal at scale. Both addQuery and addEncodedQuery push filters to the DB. Exam accepts D when both B and C are listed.

  • hamessmith · Apr 27, 10:09 AM

    Pro tip: assignment_group.name dot-walk works but sys_id on the group is faster on huge tables. Either still beats the while-loop filter pattern.

  • puddingandchomps · May 7, 12:06 PM

    I almost picked B only because I live in addQuery — read the 'both are correct' wording.

Q-8440

Question Q-8440 A developer creates a client-callable Script Include. What is required…

2 comments · last active May 4, 2026

  • LostBoy611 · May 4, 6:14 AM

    Client-callable Script Include needs the checkbox + Class.create() extending AbstractAjaxProcessor + GlideAjax on the client with sysparm_name. Global scope alone doesn't cut it.

  • omiz- · May 4, 8:14 PM

    We still have teams calling sys_script_include.do directly — that's not the pattern CAD teaches.

Q-8453

Question Q-8453 A developer needs to write a GlideRecord script that processes…

2 comments · last active Apr 28, 2026

  • Cupboard500 · Apr 28, 5:49 AM

    100k incidents: setValue on GlideRecord + updateMultiple() = one SQL UPDATE. while(next()) update() is N round trips and will timeout.

  • AlphaSud · Apr 28, 8:49 PM

    deleteMultiple removes records — wrong operation. Transform Map is for import pipelines not bulk flag updates.

Q-8452

Question Q-8452 A developer is creating a workspace in UI Builder and…

2 comments · last active Apr 28, 2026

  • ermacforcekin · Apr 27, 5:31 AM

    Real-time incident count tile = Record Watcher Data Resource on UI Builder, not 5-second polling. Websocket push beats hammering Table API.

    +2 votes
  • Nutmegh · Apr 28, 12:31 AM

    GlideAjax 1-second polling is legacy widget era — wrong framework for Next Experience.

Q-8437

Question Q-8437 A developer needs to call an external REST API from…

2 comments · last active Apr 24, 2026

  • lukewilliams95 · Apr 24, 1:47 PM

    OAuth in Flow Designer = Connection & Credential Alias + Outbound REST Message + Invoke REST Message step. Hard-coding Bearer in a Set Variable is an instant security fail on the real thing.

    +2 votes
  • superrrrthrowaway123 · Apr 24, 10:47 PM

    XMLHTTPRequest is browser-side — not available in server Flow Script steps. That distractor exists to catch people who mix client and server APIs.

Question catalog for this preview

Catalog listing of the 5 preview questions for this quiz.

Question 1

A developer needs to send a platform event when a Change Request is approved, allowing multiple downstream flows to react independently to this approval event. Which ServiceNow feature should they use?

Answer choices

  • A. Create a single flow that calls all downstream processes sequentially

  • B. Use ServiceNow Event Management to register an event and publish it, allowing multiple Event Rules or Flows triggered by that event

  • C. Create a custom event using the Event Registry and fire it with `gs.eventQueue()` from a business rule, with multiple flows or script actions subscribed to the event

  • D. Both B and C are approaches — C is the platform-native developer approach (Correct)

Explanation

ServiceNow supports a publish-subscribe event model. Developers: (1) Register a custom event in the Event Registry (System Policy > Events > Registry) with a name like `change.approved`; (2) Fire the event from a business rule using `gs.eventQueue('change.approved', current, parm1, parm2)`; (3) Create Script Action records that subscribe to this event and execute when it fires. Multiple Script Actions can subscribe to the same event, enabling independent parallel downstream processing without tight coupling. Flow Designer flows can also be triggered by platform events. This decoupled architecture is preferred over sequential chaining (option A).

Question 2

A developer notices that their scoped application's Script Include is unable to access records from a table outside their application scope. What is the MOST likely cause?

Answer choices

  • A. The script has a syntax error preventing execution

  • B. Application scope isolation — the Cross-Scope Access Policy for the target table or application has not granted read access to the developer's scope (Correct)

  • C. The user running the script lacks the necessary role

  • D. GlideRecord cannot access tables in different scopes under any circumstances

Explanation

ServiceNow's Application Scope security model enforces Cross-Scope Access Policies. When a scoped application tries to access tables, script includes, or other artifacts owned by another scope (including the global scope), the target scope must explicitly grant access via a Cross-Scope Access Policy. If no policy exists, the operation is blocked. To resolve: navigate to the target application/table's scope, create a Cross-Scope Access Policy granting the requesting scope the needed operation (read, write, execute). Option D is incorrect—cross-scope table access IS possible with proper policies. Option C (role-based) is a separate concern and is checked after scope access.

Question 3

A developer needs to write a GlideRecord script that processes a large number of records (100,000+) efficiently. The script should update the "processed" flag on all completed incidents older than 90 days. What is the MOST efficient approach?

Answer choices

  • A. GlideRecord query with `while(gr.next())` loop updating each record individually

  • B. `GlideRecord.deleteMultiple()` after updating all records in memory

  • C. `GlideRecord.updateMultiple()` after setting the field value without the `next()` loop (Correct)

  • D. Use a Transform Map to perform bulk updates

Explanation

`GlideRecord.updateMultiple()` is the correct bulk update method in ServiceNow. The pattern is:

```javascript

var gr = new GlideRecord('incident');

gr.addEncodedQuery('state=7^sys_created_onRELATIVELE@dayofweek@ago@90');

gr.setValue('u_processed', true);

gr.updateMultiple();

```

This executes a single SQL UPDATE statement against all matching records without looping through them individually, which is orders of magnitude faster for large datasets. Individual `gr.next()` + `gr.update()` loops (option A) generate N individual SQL UPDATE statements, creating severe performance issues and potentially hitting transaction limits. `deleteMultiple()` (option B) would delete records, not update them. Transform Maps (option D) are for import/transformation workflows.

Question 4

A developer needs to call an external REST API from a ServiceNow flow. The external API requires OAuth 2.0 Bearer token authentication. What is the CORRECT approach in Flow Designer?

Answer choices

  • A. Hard-code the Bearer token in a flow variable using Set Variable action

  • B. Create a REST Message with HTTP Method, configure an OAuth 2.0 Connection and Credential Alias, and use the Invoke REST Message step (Correct)

  • C. Use a Script step with XMLHTTPRequest to call the API directly

  • D. Create a REST API from the Inbound REST section to proxy the external API

Explanation

ServiceNow Flow Designer integrates with the Connection & Credential Aliases framework. For OAuth 2.0 external APIs, you: (1) Create an OAuth 2.0 provider record with the token endpoint, client ID, and secret; (2) Create a Connection & Credential Alias that references the OAuth provider; (3) Configure a REST Message (Outbound REST) with HTTP Method and the Connection alias. The Flow Designer "Invoke REST Message" step then handles token acquisition and refresh automatically. Hard-coding tokens (option A) is a security risk and maintenance burden. XMLHTTPRequest (option C) is a browser-side JavaScript API not available server-side. Inbound REST (option D) creates APIs that receive calls, not make them.

Question 5

A developer wants to create a custom component for the Next Experience (UI Builder) platform using the ServiceNow Component SDK. What programming model does the SDK use?

Answer choices

  • A. Angular framework with TypeScript decorators

  • B. React-like functional components with snabbdom virtual DOM and the @servicenow/ui-core library (Correct)

  • C. Vue.js single-file components

  • D. Plain JavaScript Web Components using the Custom Elements v1 specification

Explanation

ServiceNow's Next Experience Component SDK uses a React-inspired model built on top of the `snabbdom` virtual DOM library with the `@servicenow/ui-core` package. Components are defined using the `createCustomElement()` function with: view (render function using `h()` virtual DOM), controller (action handlers), state (immutable component state), and effects (async operations). This is NOT React, Angular, or Vue—it's a proprietary framework. The development workflow uses `snc-ui-component create` CLI, and components are built and deployed to the ServiceNow instance. Understanding this component model is required for the CAD Advanced certification track.