CCNA Designing interfaces and user experiences Questions

50 questions · Designing interfaces and user experiences · All types, answers revealed

1
Multi-Selectmedium

Which THREE best practices should be followed when designing a custom widget in Service Portal? (Choose three.)

Select 3 answers
A.Implement client-side validation
B.Avoid hard-coded strings
C.Use synchronous AJAX calls
D.Use the spUtil service for server calls
E.Use global variables to share data between widgets
AnswersA, B, D

Correct: Client-side validation provides immediate feedback.

Why this answer

Implementing client-side validation improves user experience. Using spUtil for server calls ensures proper integration. Avoiding hard-coded strings supports internationalization.

Global variables are discouraged, and synchronous AJAX calls block the UI.

2
MCQmedium

A flow designer wants to send an email notification with a custom logo. They need to ensure the email template references the correct image. What is the best practice?

A.Reference the image from an external CDN using a URL.
B.Attach the image to the sys_attachment table and use the sys_id in the template.
C.Upload the image directly into the email template using base64 encoding.
D.Store the image in the 'images' table and use the image name.
AnswerB

This ensures the image is stored in ServiceNow and referenced reliably.

Why this answer

Attaching the image to a sys_attachment and using the sys_id reference ensures it persists across upgrades and is the recommended approach.

3
MCQmedium

A developer wants to create a responsive portal page that displays data in a two-column layout on desktop and a single column on mobile. Which approach should be used?

A.Use a single-column layout with media queries
B.Use the Column widget in UI Builder
C.Use fixed-width tables
D.Use the Bootstrap grid with col-lg-6 and col-md-12 classes
AnswerD

Correct: This will stack columns on small screens.

Why this answer

Bootstrap's grid system with col-lg-6 and col-md-12 classes provides a responsive two-column to single-column transition. Column widgets are not for responsive layout.

4
MCQeasy

A developer needs to create a field on the Incident form that shows a red background when the priority is 'Critical'. Which feature should be used?

A.UI Policy
B.Business Rule
C.Access Control (ACL)
D.Client Script
AnswerA

UI Policies can change field attributes like style based on conditions.

Why this answer

UI Policy is the correct choice because it allows you to set a field's background color conditionally on the client side without a round trip to the server. In this case, you can create a UI Policy that triggers when the Priority field equals 'Critical' and use the 'Style' property to apply a red background to the Incident form field. This approach is efficient and directly meets the requirement for a visual indicator based on a field value.

Exam trap

The trap here is that candidates often confuse UI Policies with Client Scripts, assuming that any client-side visual change requires JavaScript, but UI Policies provide a declarative, no-code alternative that is both simpler and more maintainable for conditional styling.

How to eliminate wrong answers

Option B is wrong because Business Rules run server-side after a record is inserted, updated, or deleted, and they cannot directly modify the client-side CSS or background color of a field on the form. Option C is wrong because Access Controls (ACLs) control data access permissions (read, write, create, delete) and have no capability to alter field styling or background colors. Option D is wrong because Client Scripts can manipulate the DOM to change background colors, but they require custom JavaScript code and are less efficient than UI Policy, which provides a declarative, no-code solution specifically designed for such UI changes.

5
MCQmedium

Refer to the exhibit. A developer creates this UI Builder component but the header does not display the custom title. What is the most likely cause?

A.The field default is not applied unless the state is set
B.The states array is empty of conditions
C.The component name is not correctly registered
D.The section id is missing from the template
AnswerD

Correct: The template must use the section ID to reference the field.

Why this answer

The component configuration defines a section with a field, but the template must reference the section and field IDs to render. If the template does not include the section or field, the component will not display the title. Option C is correct.

Option A is incorrect because states do not affect field defaults. Option B is unlikely if registered correctly. Option D is incorrect because conditions are not required.

6
MCQhard

Refer to the exhibit. A dashboard filter configuration contains the above JSON. When the dashboard runs, it shows an 'Invalid filter condition' error. What is the issue?

A.The condition string is missing a closing parenthesis.
B.The operator should be 'OR' instead of 'AND'.
C.The JSON has a trailing comma after the 'operator' line.
D.The assignment group name is misspelled.
AnswerC

Trailing commas are not allowed in JSON.

Why this answer

The JSON has a trailing comma after the 'operator' value, which is invalid JSON syntax. This causes the parser to fail.

7
MCQhard

A widget's server script retrieves data from the 'incident' table using GlideRecord. A user with 'itil' role can see some incidents in the backend but the widget shows no data. What could be the reason?

A.The GlideRecord query does not include the user's assignment group filter
B.The portal page has a visibility condition that excludes the user
C.The widget is using client-side REST API instead of server-side
D.The widget's server script is not returning data because of a syntax error
AnswerB

Correct: The widget may be hidden due to user criteria.

Why this answer

Widget server scripts respect ACLs. If the widget is assigned to a portal that does not have the correct user criteria, or if the user's portal roles differ from backend roles, the data may not be visible.

8
MCQeasy

What is the primary purpose of the 'Theme and Branding' module in Service Portal?

A.To create custom widgets
B.To define global visual styles like colors and fonts
C.To manage portal page layouts
D.To configure portal security settings
AnswerB

Correct: Theme and Branding controls the portal's look and feel.

Why this answer

The Theme and Branding module allows administrators to define global styles such as colors, fonts, and logos that apply across all portal pages.

9
Multi-Selecteasy

Which TWO factors are most important when designing a dashboard for executives to monitor key performance indicators? (Choose two.)

Select 2 answers
A.Including all available metrics
B.Real-time data accessibility
C.Using complex filter conditions
D.Visual clarity and simple layout
E.Detailed transactional data
AnswersB, D

Executives need up-to-date information for decision-making.

Why this answer

Executives need summarized, high-level data that is current and presented clearly. Real-time data accessibility and visual clarity are top priorities.

10
MCQmedium

A form has a field 'Department' that, when changed, should make 'Manager' mandatory. The current implementation uses a client script that updates the field attribute on change. However, the mandatory behavior only works when the user first loads the form, but not when changing the field. What is the most likely cause?

A.A UI Policy with same condition is overriding the client script.
B.The client script is not triggered because the field change event is not handled.
C.The script uses g_form.setMandatory() which only works on initial load, not on change.
D.The field is referenced by the wrong name.
AnswerA

UI Policies run after client scripts and can overwrite the mandatory setting.

Why this answer

The script should use a UI Policy instead, as client scripts for such actions require proper event bindings and are less reliable.

11
MCQhard

Refer to the exhibit. What security risk is present in this implementation?

A.The request exposes internal API credentials
B.The endpoint does not require authentication
C.The client exposes the widget to XSS attacks
D.The data is not subject to the same ACLs as server-side calls
AnswerD

Correct: Client-side REST calls may have different ACL behavior than server GlideRecord queries.

Why this answer

Using client-side $http calls bypasses the server-side ACL evaluation that occurs when using spUtil or server scripts. Client-side REST API calls still respect ACLs based on the user's session, but they may expose sensitive data that goes through different security checks. However, a more critical risk is that the endpoint might be susceptible to CSRF if not protected.

In the context of Service Portal, the recommended approach is to use spUtil.get or a server script to ensure proper data access control. Option D highlights the risk of inconsistent ACL enforcement.

12
Multi-Selecteasy

Which TWO accessibility considerations are essential when designing for Service Portal? (Choose two.)

Select 2 answers
A.Use of color alone for important information
B.Complex data tables without headers
C.Auto-play videos
D.Proper heading structure
E.Keyboard navigation support
AnswersD, E

Correct: Headings help screen readers navigate content.

Why this answer

Proper heading structure and keyboard navigation are essential for accessibility. Color alone should not convey information, and auto-play videos can be a barrier. Complex data tables can be made accessible but require proper markup.

13
MCQmedium

A knowledge base article template needs a new custom field for 'Article Version'. The administrator wants to add this field to the template so it appears on all articles using that template. What is the correct approach?

A.Modify the existing template to include the new field.
B.Create a new template with the field and re-assign all articles.
C.Use a UI Policy to show the field on articles using that template.
D.Add the field globally to the Knowledge base application file.
AnswerA

Templates define the layout, so adding the field to the template propagates to articles.

Why this answer

Knowledge base templates define the fields that appear on articles. Adding the field to the template ensures it appears on all articles using that template.

14
MCQhard

A developer is troubleshooting a Service Portal widget that loads slowly. The widget uses a server script that queries a large table without any filters. Which design change would most improve performance?

A.Add client-side caching using $scope
B.Load the widget using ng-if instead of ng-show
C.Create a custom table with only required fields
D.Add a filter condition in the GlideRecord query
AnswerD

Filtering reduces the result set, improving query performance.

Why this answer

Option D is correct because adding a filter condition to the GlideRecord query reduces the dataset retrieved from the database, minimizing network transfer and server-side processing time. Without filters, the query returns all rows from a large table, causing excessive load on the instance and slow widget rendering. Filtering at the database level is the most efficient way to improve performance in Service Portal widgets.

Exam trap

The trap here is that candidates confuse client-side optimizations (caching, DOM manipulation) with server-side data retrieval improvements, overlooking that the root cause is an unfiltered database query that must be addressed at the source.

How to eliminate wrong answers

Option A is wrong because client-side caching using $scope stores data in the browser's memory but does not reduce the initial server query that retrieves the entire unfiltered table, so the slow load persists on first access. Option B is wrong because ng-if and ng-show control DOM rendering, not data retrieval; ng-if removes elements from the DOM when false, but the widget's server script still runs and fetches all records regardless. Option C is wrong because creating a custom table with only required fields is a schema change that requires manual maintenance and does not address the immediate issue of querying the large table without filters; it also violates the principle of minimizing data retrieval at query time.

15
Multi-Selectmedium

A ServiceNow administrator is designing a new catalog item for hardware requests. The item should allow users to select a cost center from a list of available options, but only those cost centers the user is authorized to use. Which TWO approaches should the administrator use to implement this requirement?

Select 2 answers
A.Define a variable with a reference qualifier using a local variable that is populated by a catalog client script.
B.Use a 'Select Box' variable type and populate it via a script that queries the cost center table filtering by user.
C.Create a reference field on the Cost Center table and apply a reference qualifier that filters based on the user's authorization.
D.Use a 'Lookup Select Box' variable type and set the option list to a script that returns authorized cost centers.
E.Use a 'List Collector' variable type and configure a reference qualifier to limit the available cost centers.
AnswersC, E

Reference qualifiers can filter records based on user context, such as authorization.

Why this answer

Option C is correct because a reference field on the Cost Center table with a reference qualifier can dynamically filter the available cost centers based on the current user's authorization, using a condition like 'authorized_usersLIKEjavascript:gs.getUserID()'. This approach leverages native platform capabilities without requiring client-side scripts or custom population logic, ensuring security and maintainability.

Exam trap

The trap here is that candidates often confuse 'reference qualifier' with 'client-side filtering' and select options that use client scripts or custom population scripts, not realizing that reference qualifiers are the correct server-side mechanism for enforcing user-specific data access in catalog items.

16
MCQeasy

A ServiceNow administrator is building a new custom application to track employee training records. The application includes a custom table 'Training Record' with fields such as employee name, training course, completion date, and score. The administrator wants to create a user-friendly form for data entry. The form should display fields in a logical order: first employee details, then training details, then completion information. Additionally, the form should only show the 'score' field if the training type is 'Exam'. Which configuration approach best addresses these requirements?

A.Design a single form view with all fields and use two client scripts (onLoad and onChange) to hide the score field when conditions are not met.
B.Create separate modules for each combination of fields (e.g., one for Exam training, one for others) to simplify data entry.
C.Create a single form view with all fields and instruct users to use the filter function to find the fields they need.
D.Define multiple form sections to group related fields and use a UI policy to set the 'score' field visible only when training type is 'Exam'.
AnswerD

Sections improve readability; UI policy declaratively controls visibility without complex scripting.

Why this answer

Option B is correct because using form sections to organize fields logically and UI policies to conditionally show/hide the score field provides a clean, maintainable solution. Option A is incorrect because showing all fields and relying on filters does not provide a streamlined entry experience. Option C is incorrect because using client scripts for hiding fields is less maintainable than UI policies.

Option D is incorrect because creating separate modules for each record type is overly complex and unnecessary.

17
MCQeasy

Which method is recommended for applying custom CSS to a Service Portal page?

A.Use the CSS Variable Editor in UI Builder
B.Modify the Bootstrap CSS file directly
C.Add inline styles in the page template
D.Override CSS in each widget's instance options
AnswerA

Correct: CSS Variable Editor allows safe, upgrade-friendly customizations.

Why this answer

The CSS Variable Editor (or Theme and Branding) is the standard way to customize CSS in Service Portal. Customizing Bootstrap directly is not recommended.

18
MCQhard

A dashboard with multiple indicators is loading slowly. The dashboard contains live data from several tables with complex conditions. Which optimization should be applied first?

A.Use client-side scripts to load data asynchronously.
B.Reduce the number of indicators to one.
C.Convert indicators to use aggregated data sources instead of live queries.
D.Increase the cache timeout for all indicators.
AnswerC

Aggregate indicators pre-compute data, reducing real-time queries and improving performance.

Why this answer

Using aggregate indicators reduces the number of live queries by pre-calculating data, which is the most effective optimization for dashboard performance.

19
MCQmedium

Refer to the exhibit. A UI Policy is defined on the Incident table. When will the 'assigned_to' field be hidden?

A.When the incident state is 1.
B.Never.
C.Always.
D.When the incident state is not 1.
AnswerA

The condition checks if current.state equals 1.

Why this answer

Option A is correct because the UI Policy in the exhibit is configured with a condition that hides the 'assigned_to' field when the 'state' field equals 1 (typically 'New'). UI Policies run client-side and evaluate the condition in real time; when the condition is true, the field is hidden. The exhibit shows the condition 'state = 1' with the 'Hidden' attribute checked, so the field is hidden only when the incident state is 1.

Exam trap

The trap here is that candidates often confuse UI Policies with Business Rules or ACLs, assuming the condition applies server-side or that the field is hidden permanently, when in fact UI Policies are client-side and only apply while the condition is true on the form.

How to eliminate wrong answers

Option B is wrong because the UI Policy explicitly defines a condition that hides the field, so it is not 'never' hidden; it is hidden when the condition is met. Option C is wrong because the UI Policy does not apply unconditionally; it has a condition ('state = 1'), so the field is not hidden 'always' — only when the condition is true. Option D is wrong because the condition is 'state = 1', meaning the field is hidden when state is 1, not when state is not 1; the opposite logic would require a condition like 'state != 1'.

20
MCQmedium

When designing a custom portal page, the developer notices that the page layout breaks on mobile devices. What is the most efficient approach to ensure responsiveness?

A.Add a media query for each device
B.Implement Bootstrap grid classes
C.Use fixed pixel widths
D.Use a single-column layout
AnswerB

Correct: Bootstrap grid classes are the standard responsive framework in Service Portal.

Why this answer

Service Portal uses Bootstrap for responsive design. Implementing Bootstrap grid classes is the standard and efficient method. Option A is not responsive.

Option C is more work and less efficient. Option D would work but does not leverage the built-in framework.

21
MCQhard

A company wants to customize the theme of their ServiceNow instance to match corporate branding, including colors and fonts. Which method is the most maintainable and upgrade-safe?

A.Modify the system CSS files directly via the UI.
B.Override CSS in a custom stylesheet and include it in the page using a UI Macro.
C.Inject custom CSS using a UI Script.
D.Use the 'Application' > 'Global CSS and Theme' module to define overrides.
AnswerD

This is the supported way to customize themes, with built-in upgrade protection.

Why this answer

Using the Global CSS and Theme system allows customizations in a dedicated module that survives upgrades, unlike direct modifications of system CSS.

22
MCQmedium

Refer to the exhibit. A UI Policy is configured to run 'On Condition' with the condition 'Urgent is true'. Users report that when they check the 'Urgent' checkbox, the 'Reason' field does not become mandatory. What is the most likely cause?

A.The UI Policy should be set to 'On Load' only.
B.The script uses getValue('urgent') but the field name is 'u_urgent'.
C.The condition should be set to 'Urgent is false'.
D.The script should use g_form.setValue instead of setMandatory.
AnswerB

The field name in the UI Policy condition is 'Urgent' which corresponds to 'u_urgent' in scripts.

Why this answer

The script uses getValue('urgent') but the actual field name is 'u_urgent' as per the condition (UI Policy condition uses 'Urgent' which maps to 'u_urgent' in the database). The mismatch causes the script to not trigger properly.

23
Drag & Dropmedium

Drag and drop the steps to create a new Update Set in ServiceNow into the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order

Why this order

The sequence: navigate to Local Update Sets, create new, provide details, set state to In Progress, and submit.

24
MCQhard

A service portal developer needs to create a spreadsheet-like view for bulk editing incident records directly in the portal. Which ServiceNow feature is designed for this purpose?

A.Use the 'Form' widget with a multi-record template.
B.Use the 'Report' widget with a drill-down option.
C.Use a custom UI macro to display an HTML table with editable cells.
D.Use the 'Data Table' widget with the 'Inline Edit' option enabled.
AnswerD

This widget provides editable grid capabilities for the service portal.

Why this answer

The Data Table widget with inline editing allows users to edit records in a grid format, which is the intended solution for bulk editing in the portal.

25
Multi-Selecthard

Which TWO approaches are valid for applying custom theming to Service Portal? (Choose two.)

Select 2 answers
A.Applying a custom LESS file via Theme and Branding
B.Overwriting widget CSS via widget instance options
C.Modifying the Bootstrap CSS directly
D.Using the CSS Variable Editor in UI Builder
E.Using the Theme and Branding module
AnswersA, E

Correct: Custom LESS files allow advanced styling while maintaining upgradeability.

Why this answer

Modifying Bootstrap CSS directly is not upgrade-safe. Overwriting widget CSS via instance options is not a global theming approach. The correct methods are using the Theme and Branding module and applying custom LESS files.

26
Multi-Selecteasy

Which three elements are required to create a Service Portal widget that displays data from a table?

Select 3 answers
A.A widget dependency
B.An HTML template
C.A server script (Server-side script)
D.A CSS stylesheet
E.A client controller (AngularJS)
AnswersB, C, E

Defines the widget's user interface.

Why this answer

An HTML template is required because it defines the structure and layout of the widget's user interface. In Service Portal, the HTML template uses AngularJS directives to bind data from the server script and client controller, enabling dynamic rendering of table records.

Exam trap

ServiceNow often tests the misconception that a widget dependency is mandatory for any data display, but in reality, dependencies are only required when importing external scripts or styles, not for basic table queries.

27
Matchingmedium

Match each ServiceNow notification type to its trigger.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Sends email based on record conditions

Sends text message

Sends message to Slack channel

Sends alert to mobile app

Makes automated phone call

Why these pairings

Notifications can be delivered through various channels.

28
MCQeasy

A large enterprise is deploying ServiceNow for IT Service Management. The UX team has designed a new portal for end users to request services. The portal should have a modern, responsive design with custom branding. The development team decides to use Service Portal with AngularJS widgets. After initial deployment, the portal loads slowly and some widgets display a blank page. Analysis shows that the widget server scripts are making multiple synchronous GlideRecord queries to the same table, and the client scripts are not handling asynchronous data loading properly. The team needs to optimize the portal performance and fix the blank page issue. Which course of action should the team take?

A.Convert all widgets to use Jelly templates instead of AngularJS to reduce client-side complexity.
B.Replace the Service Portal with a custom UI Page and UI Macro based portal for better performance.
C.Enable server-side caching for the widget server scripts and increase the cache size.
D.Refactor the server scripts to use GlideAggregate for aggregated queries, and ensure the client controller uses $scope.$on to wait for data before rendering.
AnswerD

GlideAggregate reduces database round trips, and proper async handling prevents blank pages.

Why this answer

Option D is correct because the performance issue stems from multiple synchronous GlideRecord queries in server scripts, which block the widget rendering. Refactoring to GlideAggregate reduces database round-trips by performing aggregated queries, and using $scope.$on in the AngularJS client controller ensures the view waits for asynchronous data before rendering, fixing the blank page issue.

Exam trap

The trap here is that candidates may think caching (Option C) or switching to legacy technologies (Options A and B) will fix performance, but the question specifically tests understanding of GlideRecord vs. GlideAggregate and AngularJS asynchronous patterns in Service Portal.

How to eliminate wrong answers

Option A is wrong because converting to Jelly templates would not address the root cause of synchronous GlideRecord queries or asynchronous data handling; Jelly is a legacy templating engine that lacks the responsive, modern design capabilities of AngularJS and would not fix the performance or blank page issues. Option B is wrong because replacing Service Portal with custom UI Pages and UI Macros would require significant rework, lose the built-in responsive design and AngularJS framework, and does not solve the underlying query optimization or async data loading problems. Option C is wrong because enabling server-side caching for widget server scripts does not address the synchronous GlideRecord queries that block execution; caching may reduce repeated queries but does not fix the blank page caused by client scripts not waiting for async data, and increasing cache size is irrelevant to the core issue.

29
MCQmedium

A company is redesigning a service catalog item that has multiple variables. Some variables should only appear when a specific value is selected in a previous variable, and some fields must be mandatory based on the selected options. The development team is debating whether to use UI policies or client scripts for this logic. What is the best practice for implementing such dynamic behavior in a ServiceNow catalog item?

A.Always use client scripts for visibility and mandatory conditions to handle complex scenarios.
B.Configure Access Control Lists (ACLs) to restrict field access based on user roles and variable values.
C.Use UI policies for visibility and mandatory conditions, and use client scripts only for advanced logic that UI policies cannot handle.
D.Use a workflow to control field visibility and mandatory settings based on variable values.
AnswerC

UI policies are the optimal choice for field-level conditions; client scripts supplement when needed.

Why this answer

Option C is correct because UI policies are declarative and intended for visibility, read-only, and mandatory conditions, making them easier to maintain and debug. Option A is wrong because client scripts should be used only for complex logic that cannot be achieved with UI policies, not as a default approach. Option B is wrong because workflows are for backend processes, not client-side field behavior.

Option D is wrong because ACLs control data access, not form behavior.

30
MCQmedium

A ServiceNow developer is designing a portal for end users to submit requests. The requirements state that users should be able to track the status of their requests and receive notifications when the status changes. Which combination of ServiceNow features best meets these requirements?

A.Service Portal and Access Controls (ACLs)
B.Service Portal and Catalog Client Scripts
C.Service Portal and Notifications
D.Service Portal and UI Policies
AnswerC

Service Portal provides the interface; Notifications send status updates.

Why this answer

Service Portal provides the user interface for request submission and tracking, while Notifications (via the Notification and Event Management framework) automatically send email or in-app alerts when a record's status changes. This combination directly fulfills both the tracking and notification requirements without adding unnecessary complexity.

Exam trap

ServiceNow often tests the distinction between client-side features (Client Scripts, UI Policies) and server-side notification mechanisms, leading candidates to mistakenly choose a client-side option for a server-triggered requirement like status change notifications.

How to eliminate wrong answers

Option A is wrong because Access Controls (ACLs) govern data security and permissions, not status tracking or notification delivery. Option B is wrong because Catalog Client Scripts run on the client side to validate or manipulate form data, but they cannot trigger server-side notifications when a status changes. Option D is wrong because UI Policies control field visibility, mandatory status, and read-only behavior on forms, but they do not provide status tracking or notification capabilities.

31
MCQeasy

A developer is creating a service portal widget that shows a list of active incidents. The data should be refreshed every 30 seconds. What is the recommended design pattern?

A.Use a server-side script with a polling model to return data on a timer.
B.Use a third-party library for WebSocket connections.
C.Use a widget option to set the refresh rate and a server-side script to fetch data.
D.Use a client-side JavaScript interval to reload the page.
AnswerC

This combines a configurable option with server-side data retrieval, following best practices.

Why this answer

Using a server-side script with a polling model is the standard approach to periodically fetch data in a widget without overloading the client.

32
MCQmedium

A Service Portal widget displays a list of catalog items. Each catalog item should link to a record producer that opens in a modal dialog. Which approach should the developer use to open the modal?

A.Use $scope.$broadcast to trigger a modal event
B.Use spModal.open with the record producer sys_id
C.Use $uibModal.open to create a modal with a custom template
D.Use window.open to open the record producer URL
AnswerC

$uibModal is the Angular UI Bootstrap service for modals.

Why this answer

Option C is correct because Service Portal widgets use AngularJS, and the standard way to open a modal with a custom template (such as a record producer form) is via `$uibModal.open`. This method allows the developer to specify a controller, template, and resolve data, giving full control over the modal's behavior and content. Record producers are typically rendered inside a custom template, not directly via a sys_id parameter.

Exam trap

ServiceNow often tests the distinction between Service Portal-specific utilities (`spModal`) and general AngularJS UI Bootstrap (`$uibModal`), leading candidates to incorrectly choose `spModal.open` for complex modals like record producers.

How to eliminate wrong answers

Option A is wrong because `$scope.$broadcast` is used to send events down the scope hierarchy, not to open modals; it would require a listener to handle the event and manually create a modal, which is an indirect and non-standard approach. Option B is wrong because `spModal.open` is a Service Portal utility for simple confirmations or alerts, not for opening record producers; it does not accept a record producer sys_id to render a form. Option D is wrong because `window.open` opens a new browser tab or window, not a modal dialog within the Service Portal, and it would break the single-page application experience.

33
MCQhard

A ServiceNow developer is building a custom service portal widget that displays a list of open incidents for the current user. The widget includes a button to reassign an incident to a selected group. The developer writes a client controller function that calls $http.post to a scripted REST API endpoint. However, when the button is clicked in production, the console shows 'unexpected token <'. The developer confirms the endpoint does not exist. What is the best course of action?

A.Change the button to a direct link to a different page.
B.Create a script include with the reassign logic, and call it from the widget server-side script using a client callable action.
C.Move the entire reassign logic to a client-side script using GlideRecord via Ajax.
D.Use a custom UI macro instead of a widget.
AnswerB

This uses the proper ServiceNow architecture: server-side logic via Script Include, exposed via server script, and invoked via client callable.

Why this answer

Using a script include with a server-side script and widget server-side script is the recommended pattern for server-side logic. It avoids direct REST calls and follows ServiceNow best practices.

34
MCQeasy

A user reports that a field 'Cost Center' is not visible on a form, but the UI Policy condition to show it is met. What is the first step in troubleshooting?

A.Check the form layout to ensure the field is present on the form.
B.Check the client script that may be hiding the field.
C.Check the ACLs for the 'Cost Center' field.
D.Check the role requirements for the field.
AnswerA

If the field is not on the form, no UI policy can make it appear.

Why this answer

Checking the form layout ensures the field is actually placed on the form, as UI policies can only control visibility if the field exists on the form.

35
MCQhard

A company uses Service Portal for employee self-service. One widget displays a list of open requests from the sc_request table. The widget uses a server script that queries all records without a filter. As the request table grows, users experience slow loading times. The widget configuration allows client-side filtering but not server-side pagination. The developer must improve performance without changing the user experience. What should the developer do?

A.Increase the server timeout value to allow more time for the query to complete.
B.Implement pagination in the server script and modify the widget to load data in chunks.
C.Add a client-side filter to the widget to display only a subset of records.
D.Use a UI Policy to hide the widget for users with many requests.
AnswerB

Pagination reduces the amount of data sent per request, improving initial load time.

Why this answer

Option B is correct because implementing server-side pagination reduces the amount of data retrieved from the database in a single query, which directly addresses the performance bottleneck caused by loading all records from the sc_request table. By modifying the server script to return only a subset of records (e.g., 25 per page) and updating the widget to request subsequent pages as the user scrolls or clicks, the developer improves load times without altering the user experience. This approach leverages ServiceNow's GlideRecord query efficiency and avoids the overhead of transferring and rendering large datasets on the client.

Exam trap

The trap here is that candidates often confuse client-side filtering with server-side optimization, assuming that filtering on the client reduces server load, when in fact the entire dataset must still be fetched from the database.

How to eliminate wrong answers

Option A is wrong because increasing the server timeout does not reduce the query execution time or the amount of data transferred; it only masks the symptom by allowing more time for the slow operation to complete, which does not solve the underlying performance issue. Option C is wrong because adding a client-side filter still requires the server to fetch all records from the sc_request table before filtering on the client, so the database query and data transfer remain unchanged, and performance does not improve. Option D is wrong because using a UI Policy to hide the widget for users with many requests alters the user experience by denying access to the widget, which violates the requirement to not change the user experience.

36
Multi-Selecteasy

Which TWO are benefits of using a Service Portal widget over a UI Page?

Select 2 answers
A.Widgets automatically handle user authentication.
B.Widgets can be easily reused across multiple portals.
C.Widgets provide built-in accessibility features.
D.Widgets are faster because they use synchronous server calls.
E.Widgets support AngularJS data binding.
AnswersB, E

Widgets are designed for reusability and can be added to any portal.

Why this answer

Option B is correct because Service Portal widgets are designed as reusable components that can be shared across multiple portals without duplication. Unlike UI Pages, which are page-specific and must be copied or recreated for each portal, widgets can be configured with options and instances, making them modular and maintainable. Option E is correct because Service Portal widgets natively support AngularJS, enabling two-way data binding between the client-side controller and the HTML template, which simplifies dynamic UI updates without manual DOM manipulation.

Exam trap

ServiceNow often tests the misconception that UI Pages are obsolete or that widgets are inherently faster, but the real differentiator is reusability and AngularJS data binding, not performance or built-in features.

37
Multi-Selecteasy

Which TWO conditions can be used as triggers for a UI Policy to set a field as mandatory? (Choose two.)

Select 2 answers
A.A record is submitted
B.A specific field value changes
C.The form is loaded
D.An ACL evaluates to false
E.The user has a specific role
AnswersB, C

On change conditions are common for UI Policies.

Why this answer

UI Policies can be triggered by changes to a specific field value or when the form is loaded. ACLs and user roles are not triggers for UI Policies.

38
MCQhard

A large enterprise is implementing a Service Portal for employees to request IT equipment. The portal must be accessible globally, with users in Europe, Asia, and the Americas. The development team has created a custom widget that displays the user's local time based on their location. The widget uses a server script that calls a third-party geolocation API to determine the user's timezone based on their IP address. However, during peak hours, the widget takes over 10 seconds to load, causing poor user experience. The team also notices that the same timezone is fetched repeatedly for the same user across different sessions. The portal uses a CDN for static assets. Which approach should the developer take to reduce the load time while maintaining accuracy?

A.Implement asynchronous loading of the widget so the page loads without waiting for the timezone
B.Use client-side JavaScript to detect the timezone from the browser's Intl API instead of server-side API call
C.Move the geolocation API call to a business rule that runs once per user
D.Cache the timezone result in a user preference or session storage after the first request
AnswerD

Caching avoids repeated API calls and significantly reduces load time for subsequent requests.

Why this answer

Option D is correct because caching the timezone result in a user preference or session storage eliminates redundant API calls for the same user across sessions. This directly reduces load time by avoiding the 10-second geolocation API call on subsequent requests, while maintaining accuracy since the user's IP-based timezone is unlikely to change frequently. In ServiceNow, storing this data in a user preference (e.g., `sys_user_preference`) or session storage ensures persistence without repeated server-side processing.

Exam trap

ServiceNow often tests the misconception that client-side JavaScript (Intl API) is a drop-in replacement for server-side geolocation, but the trap here is that the Intl API returns the browser's configured timezone, not the user's actual geographic location, which fails the accuracy requirement for a globally accessible portal.

How to eliminate wrong answers

Option A is wrong because asynchronous loading only hides the delay from the user but does not reduce the actual 10-second API call time; the widget still takes that long to render, potentially causing partial page loads or race conditions. Option B is wrong because the browser's Intl API returns the client's local timezone based on system settings, not the user's geographic location; this could be inaccurate if the user is traveling or using a VPN, and it does not align with the requirement to determine timezone from IP address. Option C is wrong because a business rule runs on the server during record operations (e.g., insert/update), not on portal page load; it cannot be triggered per user session for a widget and would not solve the repeated API call issue for the same user across sessions.

39
MCQhard

A Service Portal widget uses an AngularJS controller that directly modifies the DOM using jQuery inside the controller. After a platform upgrade, the widget stops working properly. What is the most likely reason?

A.jQuery is no longer allowed
B.Direct DOM manipulation conflicts with AngularJS digest cycles
C.The widget's controller syntax changed
D.AngularJS was completely removed from the platform
AnswerB

Correct: After an upgrade, digest cycles may behave differently, causing DOM changes to be overwritten.

Why this answer

Service Portal's AngularJS-based architecture is moving away from direct DOM manipulation. The correct approach is to use AngularJS data binding. The upgrade may have changed the order of digest cycles, causing inconsistencies.

40
Multi-Selecteasy

Which TWO are best practices for designing forms in ServiceNow to enhance user experience and maintainability?

Select 2 answers
A.Leverage related lists to display one-to-many relationships on a form.
B.Always enable the 'Use Default Form' checkbox to ensure consistency.
C.Use a single form layout for all record types to reduce complexity.
D.Group related fields using sections to organize the form logically.
E.Avoid using reference fields on forms as they slow down performance.
AnswersA, D

Related lists provide a clear overview of child records directly on the parent form.

Why this answer

Options B and D are correct. B: Related lists are effective for displaying one-to-many relationships, providing quick access to related records. D: Grouping related fields into sections improves form readability and logical flow.

Option A is incorrect because using a single layout may not suit all form types; sections enhance organization. Option C is incorrect; the 'Use Default Form' checkbox is not a universal best practice—it depends on context. Option E is incorrect; reference fields are commonly used and essential for relational data.

41
MCQhard

A multinational corporation uses a single ServiceNow instance for IT service management. The ServiceNow portal serves thousands of users across multiple departments (HR, Finance, IT, Legal). Each department requires a customized portal experience: specific branding, tailored service catalog, and unique knowledge bases. The current implementation uses a single portal with multiple widgets that conditionally display content based on user group membership. Users have reported slow page loads and inconsistent styling across departments. The ServiceNow administrator must redesign the portal architecture to improve performance and maintainability while accommodating each department's requirements. Which approach should the administrator take?

A.Maintain a single portal but leverage ServiceNow's branding records and theme variants to apply department-specific styling; optimize widgets with client-side caching and lazy loading.
B.Create a separate portal for each department, each with its own theme and set of widgets to fully isolate customizations.
C.Standardize all departments onto a single, simple portal with no customizations to reduce complexity and improve load times.
D.Keep one portal with a single theme and use extensive client scripts to alter styling and content based on the user's department.
AnswerA

This approach centralizes portal management while allowing tailored experiences; caching and lazy loading improve performance.

Why this answer

Option B is correct because using a single portal with ServiceNow's branding infrastructure (branding records, theme variants) allows centralized management while providing department-specific customization. Optimizing widgets with client-side caching and lazy loading addresses performance concerns. Option A is incorrect because creating separate portals per department leads to significant maintenance overhead and fragmentation of configurations.

Option C relies on client scripts for styling, which is inefficient and difficult to maintain; performance remains poor. Option D ignores departmental requirements, resulting in a poor user experience.

42
MCQeasy

A company wants to display a list of open incidents on a Service Portal page. Which component should be used?

A.Map widget
B.Data Table Widget
C.Performance Analytics widget
D.List View Widget
AnswerB

Correct: Data Table Widget is designed to display record lists on portals.

Why this answer

The Data Table Widget is the standard component for displaying lists of records in Service Portal. Option B is wrong because List View Widget is used in the backend UI, not on portals. Option C is for analytics.

Option D is for displaying maps.

43
MCQeasy

Refer to the exhibit. The developer expects a list of incidents in the widget, but the page renders with an error. What is the most likely cause?

A.The server script is missing a return statement
B.getRow() is not a valid method on GlideRecord
C.The query does not filter for active incidents
D.The data.items array is not initialized correctly
AnswerB

Correct: getRow() is not a GlideRecord method; it causes a script error.

Why this answer

The method getRow() does not exist on GlideRecord. The correct approach is to use getValue() for each field. Option A is correct.

Options B and C are possible but not the most likely cause of an immediate error. Option D is incorrect because server scripts do not require a return statement.

44
Multi-Selecthard

A developer is designing a custom application with a table that stores sensitive employee data. The requirement is that only managers can view records where they are the manager of the employee. Which two configurations are needed to implement this requirement?

Select 2 answers
A.Use a UI Policy to set fields to read-only or invisible for non-managers
B.Create an ACL with a condition script that checks if the logged-in user is the manager of the record's employee
C.Create a new view that excludes sensitive fields
D.Create a Business Rule that deletes records if the user is not the manager
E.Use a Client Script to hide fields if the user is not the manager
AnswersA, B

UI Policies can set field attributes like visible or read-only based on conditions.

Why this answer

Option A is correct because UI Policies can be configured to set fields as read-only or invisible based on conditions, such as the user's role or relationship to the record. This allows non-managers to see the record but prevents them from viewing sensitive fields, aligning with the requirement to restrict visibility at the field level.

Exam trap

The trap here is that candidates often confuse client-side controls (UI Policies, Client Scripts) with server-side security (ACLs), assuming that hiding fields on the form is sufficient to protect sensitive data, when in fact ACLs are required to prevent data access via web services or direct database queries.

45
MCQhard

A company wants to create a custom homepage for their service portal that displays three different data sources in a single view. The design must ensure that if one data source fails to load, the other two continue to function. Which implementation approach aligns best with this requirement?

A.Use a parent widget that calls three child widgets
B.Use three separate widgets each fetching their own data
C.Use a widget that loads data in parallel with error handling
D.Use a single widget that fetches all data sequentially
AnswerB

Correct: Separate widgets run independently, so one failure does not affect others.

Why this answer

Using three separate widgets isolates failures. Options A, C, and D can cause cascading failures. Option B ensures independence.

46
MCQmedium

A company is redesigning its service catalog to improve user experience. One of the catalog items, 'Request New Software', contains 10 variables including software category, license type, and required approvals. The variable fields should dynamically show/hide and become mandatory based on previous selections. Currently, the catalog item uses a single, complex catalog client script that handles all visibility and mandatory conditions. This script has become difficult to maintain, and users experience delays when interacting with the form. The IT team wants a more efficient and maintainable solution. What should the administrator do?

A.Move the entire logic to a business rule that runs on the server side to reduce client-side processing.
B.Implement UI policies for visibility and mandatory conditions, and keep a streamlined catalog client script only for dynamic field values or complex calculations.
C.Convert all conditions to UI policies to replace the catalog client script entirely.
D.Refactor the existing catalog client script into a single, more efficient script with optimized conditions.
AnswerB

UI policies handle declarative conditions efficiently; client scripts supplement when needed, improving maintainability.

Why this answer

Option C is correct because UI policies are designed to handle visibility, read-only, and mandatory conditions declaratively, improving maintainability. The catalog client script should be reserved for complex dynamic values or calculations that UI policies cannot perform. Option A is incorrect because while UI policies are good, some complex logic may still require client scripts; a full conversion may not always be possible.

Option B is incorrect because a single script with complex conditions will still be hard to maintain and may cause performance issues. Option D is incorrect because business rules run server-side and cannot directly control client-side form behavior such as field visibility.

47
Multi-Selectmedium

Which THREE best practices should a developer follow when designing a service portal widget? (Choose three.)

Select 3 answers
A.Define widget options for configuration
B.Avoid using the widget's server-side script for any logic
C.Use server-side scripts to fetch data
D.Use client-side scripts exclusively for data retrieval
E.Use the widget's 'Client Script' field sparingly and only for UI interactions
AnswersA, C, E

Options make widgets reusable and configurable without code changes.

Why this answer

Using server-side scripts for data, defining clear options, and following widget scope best practices ensure maintainable and performant widgets.

48
MCQmedium

A developer created a UI Script and a Client Script as shown. Both scripts set urgency and impact to '1' when priority is '1'. However, when the priority is changed to '1' on an existing record, the urgency and impact fields do not update. What is the most likely cause?

A.The UI Script is not being called because it is not associated with any form or event
B.The priority field is not a choice field, so onChange does not fire
C.The Client Script function name is incorrect; it should be 'onChangePriority'
D.The g_form API is deprecated and no longer works
AnswerA

UI Scripts are not automatically executed; they must be called from a Client Script or UI Policy.

Why this answer

A UI Script is a reusable client-side script that must be explicitly called from a Client Script, UI Policy, or form event to execute. In this scenario, the UI Script is not associated with any form or event, so it never runs when the priority field changes. The Client Script alone cannot invoke the UI Script without a direct call, leaving the urgency and impact fields unupdated.

Exam trap

ServiceNow often tests the distinction between defining a script and executing it, trapping candidates who assume that simply creating a UI Script will automatically run it on field changes without an explicit trigger.

How to eliminate wrong answers

Option B is wrong because the onChange event fires on any field change, including choice fields like priority; the issue is not about field type but about the UI Script not being triggered. Option C is wrong because the Client Script function name can be any valid JavaScript function name; the onChange event is bound to the field, not the function name, so 'onChangePriority' is not required. Option D is wrong because the g_form API is not deprecated and continues to work in current ServiceNow versions; the problem is unrelated to API deprecation.

49
MCQeasy

A company needs to allow employees to request a new laptop through a catalog item. The form should only show a 'Configuration' section if the user selects 'Yes' for 'Custom Configuration?'. Which design approach best accomplishes this?

A.Use a UI Policy to show/hide the section based on the field value.
B.Use a client script to hide the section when the field changes.
C.Use an ACL to restrict access to the section.
D.Use a catalog client script to set the visibility.
AnswerA

UI Policies are the standard way to control visibility of fields/sections declaratively.

Why this answer

UI Policies are declarative and maintainable for showing/hiding variables based on conditions, unlike client scripts which can be brittle.

50
MCQmedium

A developer writes a widget client controller that uses spUtil.get to fetch data from the server. The data is correctly returned, but the widget does not update the UI. What is the most likely cause?

A.The widget's HTML template does not reference the correct variable name
B.The callback does not assign the result to a $scope variable
C.The server script did not set data correctly
D.The spUtil.get method is deprecated
AnswerB

Correct: Without updating $scope, AngularJS does not know to re-render.

Why this answer

spUtil.get returns a promise, and the success callback should assign to $scope to trigger digest cycle. If the callback does not update a $scope property, the view will not update.

Ready to test yourself?

Try a timed practice session using only Designing interfaces and user experiences questions.