nerdexam
Salesforce

PDI · Question #53

A developer must create a lightning component that allows users to input contact record information to create a contact record, including a salary__c custom field. what should the developer use, along

The correct answer is A. <ligthning-input-field field-name="Salary__c">. To create a currency input field that automatically respects Field-Level Security within a lightning-record-edit-form, the lightning-input-field component should be used.

Submitted by parkjh· Apr 18, 2026User Interface

Question

A developer must create a lightning component that allows users to input contact record information to create a contact record, including a salary__c custom field. what should the developer use, along with a lightning-record-edit form, so that salary__c field functions as a currency input and is only viewable and editable by users that have the correct field levelpermissions on salary__C?

Options

  • A<ligthning-input-field field-name="Salary__c">
  • B<lightning-formatted-number value="Salary__c" format-style="currency"> </lightning-formatted-
  • C<lightning-input type="number" value="Salary__c" formatter="currency"> </lightning-input>
  • D<lightning-input-currency value="Salary__c">

How the community answered

(24 responses)
  • A
    88% (21)
  • B
    8% (2)
  • D
    4% (1)

Why each option

To create a currency input field that automatically respects Field-Level Security within a lightning-record-edit-form, the lightning-input-field component should be used.

A<ligthning-input-field field-name="Salary__c">Correct

The <lightning-input-field> component automatically renders the correct input type based on the field's metadata (e.g., currency for a currency field) and, crucially, respects Field-Level Security (FLS) for visibility and editability without additional developer code.

B<lightning-formatted-number value="Salary__c" format-style="currency"> </lightning-formatted-

<lightning-formatted-number> is used to display a formatted number, not to input data, and does not automatically handle FLS.

C<lightning-input type="number" value="Salary__c" formatter="currency"> </lightning-input>

<lightning-input> is a generic input component; while it can be configured for numbers and currency formatting, it does not inherently respect Field-Level Security.

D<lightning-input-currency value="Salary__c">

<lightning-input-currency> is not a standard Lightning Web Component (LWC) base component for inputting currency.

Concept tested: Lightning-input-field component and FLS

Source: https://developer.salesforce.com/docs/component-library/bundle/lightning-input-field/documentation

Topics

#Lightning Web Components#Field-Level Security#Data Input#Record Forms

Community Discussion

No community discussion yet for this question.

Full PDI Practice