SF-PD2 User Interface Practice Question
A developer needs to display a read-only, formatted phone number on a Lightning record page. The value comes from a field on the record and should render consistently with Salesforce's standard phone formatting. Which base component should be used?
⚠ Common exam trap
The trap here is selecting a general-purpose formatter like formatted-text or formatted-number when a type-specific component exists for phone values.
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
✓
lightning-formatted-phone
lightning-formatted-phone is the base component specifically designed to render phone numbers with standard formatting and a clickable tel link. Other formatted components target different data types, and lightning-output-field depends on a record form context. For a standalone, consistently formatted phone display, the phone-specific component is the correct choice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
lightning-formatted-phone
Why this is correct
lightning-formatted-phone is purpose-built to display phone numbers with standard formatting and renders the value as a clickable tel link. It accepts a value attribute and applies consistent presentation, which is exactly what the scenario requires for a read-only formatted phone number on a record page.
- ✗
lightning-output-field
Why it's wrong here
lightning-output-field is designed for use inside lightning-record-view-form and renders a field using its metadata-defined formatting. While it can display a phone field, it requires the record form context and is not a standalone formatting component. The scenario calls for a dedicated formatting element, making this a less direct and context-dependent choice.
- ✗
lightning-formatted-number
Why it's wrong here
lightning-formatted-number formats numeric values with options for decimal places, currency, and percent. It is intended for numbers, not telephone strings, and does not produce a tel link. Applying it to a phone value would produce incorrect formatting and fail to deliver the expected phone-specific presentation.
- ✗
lightning-formatted-text
Why it's wrong here
lightning-formatted-text renders plain text and optionally converts URLs to links. It does not apply phone-specific formatting or generate a clickable tel link. Using it would display the raw value without the expected phone presentation, so it does not meet the requirement for consistent phone formatting on the record page.
About these practice questions
One of 226 original SF-PD2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.