SF-PD2 User Interface Practice Question
A developer is building a Lightning Web Component that must navigate to a new record's detail page after the record is created via a custom form. The component uses NavigationMixin. Which navigation type should the developer use to navigate to the newly created record?
⚠ Common exam trap
Test-takers frequently confuse standard__objectPage with standard__recordPage, since both relate to objects but only the latter targets a specific record.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
standard__recordPage with attributes recordId and actionName set to 'view'.
NavigationMixin supports several page reference types, and standard__recordPage is specifically designed to open a record's detail page. By providing the recordId of the newly created record and setting actionName to 'view', the component navigates the user to the standard record view. Other page reference types target object home pages, custom tabs, or external URLs and do not open a specific record.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
standard__webPage with attributes url set to the record's URL.
Why it's wrong here
The standard__webPage page reference opens an external URL in a new browser tab or window. It is intended for navigating outside Salesforce, not for internal record pages. Using it for a record URL would break the single-page app experience and may open a new tab, which is not the desired behavior for post-creation navigation.
- ✗
standard__objectPage with attributes objectApiName and actionName set to 'new'.
Why it's wrong here
The standard__objectPage page reference navigates to an object's home or list view and supports actions like 'list' or 'new'. Using actionName 'new' would open a create form rather than the detail page of an existing record. Since the record has already been created, this navigation type would not take the user to the new record's detail page.
- ✗
standard__navItemPage with attributes apiName set to the object's API name.
Why it's wrong here
The standard__navItemPage page reference navigates to a custom tab in the app navigation, identified by the tab's API name. It is not used for record detail pages and does not accept a recordId. Navigating with this type would open a tab, not the newly created record, so it does not satisfy the requirement.
- ✓
standard__recordPage with attributes recordId and actionName set to 'view'.
Why this is correct
The standard__recordPage page reference navigates to a record's detail page and accepts recordId and actionName attributes. Setting actionName to 'view' opens the record in view mode. After creating the record, the developer can pass the returned record ID to this page reference to navigate the user directly to the new record, which is the standard pattern for post-creation navigation.
About these practice questions
Courseiva writes every SF-PD2 question from scratch — 226 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Salesforce exam blueprint
This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.