Text preview & study summary

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

A free sample of 5 questions from this quiz, shown in full with answer choices and explanations. No interactivity — everything is visible on this page for study and review.

Want to test your knowledge? Launch the Interactive Exam Simulator

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.