Salesforce Decode
Salesforcedecode
Back to questions
LWCBeginnerldswireui-record-api

What is Lightning Data Service (LDS)?

Real World Scenario

You need Account Name on a component without writing Apex. You introduce LDS.

Expected Answer

• LDS provides declarative access to record data with caching and shared UI consistency • lightning-record-form and lightning-record-view-form use LDS under the hood • Wire adapters like getRecord fetch fields without custom Apex controllers • LDS respects FLS and sharing automatically • Prefer LDS over Apex for simple CRUD display to reduce server code and improve cache behavior

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Complex aggregations, integrations, or operations LDS adapters do not support. LDS covers single-record and some list patterns.

Architect Perspective

LDS first on record pages—shows you avoid unnecessary Apex, a common junior mistake.