Question Q-8445 A developer needs to handle an error in a Flow…
2 comments · last active Jun 5, 2026
By Marcus Chen · Updated May 25, 2026
| Questions | 25 |
| Passing Score | 75% |
| Format | 100% Multiple Choice |
| Sessions Logged | 1,104 |
| Your progress | Log in / Register to track times taken, best score, questions mastered, and coverage on this quiz. |
| Rating |
Uncategorized25 questions
Log in to post a comment, reply, or expand a question.
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.
Fixed ours in Studio → Application → Manage Cross-Scope Access. Took longer to find than to configure.
Component SDK = snabbdom + @servicenow/ui-core, createCustomElement(), h() render — NOT React/Angular/Vue despite the vibe.
snc-ui-component CLI deploy path is part of CAD advanced track — worth lab time if you've only done classic UI16 widgets.
Scripted REST: setContentType application/json then setBody(JSON.stringify(array)). setBody does NOT auto-serialize objects — learned that debugging a 500.
Outbound REST from a Scripted REST resource is backwards — inbound receives, outbound calls external.
setLimit(1) when you only need existence check — adds SQL LIMIT, doesn't just hide rows in UI. Huge perf win on incident tables.
Deprecated distractor is nonsense — we use setLimit daily in integration scripts.
10 second timeout option confused me until I remembered LIMIT vs query timeout are different knobs.
GitHub webhook → Scripted REST POST endpoint → parse body → sn_fd.FlowAPI.startAsync or event. Polling GitHub every minute is lazy architecture.
Email inbound for structured PR payloads is fragile — REST receiver is the right integration point.
Client script mandatory behavior = UI test ATF (Set Field Values → Assert Field Mandatory). Server-side record create won't fire onChange client logic.
Service Portal test type is wrong UI — that's not the standard platform form ATF path.
Browser-based ATF is slower but mandatory for g_form / UI Policy interactions.
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.
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.
I almost picked B only because I live in addQuery — read the 'both are correct' wording.
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.
We still have teams calling sys_script_include.do directly — that's not the pattern CAD teaches.
100k incidents: setValue on GlideRecord + updateMultiple() = one SQL UPDATE. while(next()) update() is N round trips and will timeout.
deleteMultiple removes records — wrong operation. Transform Map is for import pipelines not bulk flag updates.
Real-time incident count tile = Record Watcher Data Resource on UI Builder, not 5-second polling. Websocket push beats hammering Table API.
GlideAjax 1-second polling is legacy widget era — wrong framework for Next Experience.
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.
XMLHTTPRequest is browser-side — not available in server Flow Script steps. That distractor exists to catch people who mix client and server APIs.
Catalog listing of the 5 preview questions for this quiz.
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?
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).
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?
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.
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?
`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.
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?
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.
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?
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.
Flow Designer Error Handler on the flow — not JavaScript try/catch. Log to table + notification on Invoke REST Message failure is the native pattern.
Orlando/Paris added this — if your study material is old, update it. Business rule fallback works but isn't 'native' FD error handling.