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?
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?
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?
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?
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?
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.
