開発者は、連絡先情報を収集するためのカスタム Lightning Web コンポーネントを構築するタスクを負っています。 フォームは組織内のさまざまなタイプのユーザー間で共有されます。特定のフィールドのみが特定のユーザー グループによって編集および表示できるようにするというセキュリティ要件があります。 セキュリティ要件をサポートするために、開発者は Lightning Web コンポーネントで何を使用すればよいでしょうか?
正解:B
To support field-level security and sharing in a Lightning Web Component (LWC) form that collects Contact information, and to ensure that only certain fields are editable and viewable by specific user groups, the developer should use the appropriate base components that respect these security settings. Option B: lightning-input-field Correct Choice. The lightning-input-field component is used within lightning-record-edit-form or lightning-record-view-form. It automatically enforces field-level security and sharing rules. It ensures that users only see and edit fields they have access to, based on their profile and permission sets. force-input-field is not a valid Lightning Web Component. It was used in Aura components but is not applicable in LWC. Option C: ui-input-field Incorrect. ui-input-field is not a valid component in LWC. The ui namespace components are deprecated and were part of Aura components. Option D: aura-input-field Incorrect. There is no component named aura-input-field. Aura components use different base components, but this is not applicable to LWC. Conclusion: To meet the security requirements and support field-level security in the LWC form, the developer should use lightning-input-field within a lightning-record-edit-form. Reference: lightning-input-field Documentation Enforce Field-Level Security Incorrect Options: Option A: force-input-field Incorrect.