Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For ordinary Salesforce records in a Lightning web component (LWC), start with Lightning Data Service (LDS). Use its base components for standard forms, its wire adapters or functions for custom interfaces, and its GraphQL wire adapter for precise, relational or filtered queries. Choose Apex when UI API does not support the object or operation, or when multiple record changes must succeed or roll back as one transaction.

Choose a data-access option by the job

Need Start with Reason
Standard view, create or edit form lightning-record-form, lightning-record-view-form or lightning-record-edit-form These LDS-backed base components provide standard record interfaces with little custom data-access code. Salesforce Data Guidelines
Custom interface for a supported record LDS wire adapter or function Use a wire for reactive data; use functions such as createRecord, updateRecord or deleteRecord for individual mutations. Each function call is its own transaction. Salesforce Data Guidelines
Exact fields, filtering, relationships, combined queries or pagination LDS-backed GraphQL wire adapter GraphQL expresses field selection, filtering and relationship traversal in a query and can combine requests. Salesforce Data Guidelines and When to Use GraphQL Wire Adapter
Object not supported by UI API, such as Task or Event Apex Salesforce identifies unsupported UI API objects as an Apex use case. Salesforce Data Guidelines
Criteria-based operation UI API cannot express Apex Salesforce gives retrieving a filtered list, such as Accounts whose Amount exceeds a threshold, as an example. Salesforce Data Guidelines
Several record changes that must commit or roll back together Apex LDS functions operate as independent transactions; Apex can group multiple record operations into one transaction. Salesforce Data Guidelines
Control exactly when a read runs, such as after a click Imperative LDS function if it fits; otherwise imperative Apex Imperative calls run when invoked. An imperative Apex call resolves with one result, while @wire provisions a stream. Salesforce Data Guidelines and Call Apex Methods Imperatively

Salesforce’s recommended progression is to begin with LDS base components, move to LDS adapters when the interface needs customization, and use Apex when those options do not cover the requirement. GraphQL is another LDS-managed option when a query needs more precise selection or richer relationships. Salesforce Data Guidelines

What LDS provides beyond a data request

Shared record cache

LDS caches record data on the client and shares it among components that access the same record. Changes made through supported LDS operations can be reflected in other components using relevant LDS wires. Salesforce does not promise a fixed cache lifetime, so avoid logic that depends on data remaining cached for a specific duration. Lightning Data Service

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security behavior for user-facing records

LDS-backed UI API components and adapters enforce record sharing, object-level permissions (CRUD) and field-level security (FLS). When LDS supports the operation, this makes it a straightforward default for ordinary user-facing record access. Lightning Data Service

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Reactive data when the view changes

A wired adapter provisions data reactively, which suits a view that should respond to changes in its inputs. An imperative call instead runs only when your code invokes it. Choose based on whether the component needs a continuing provisioned stream or explicit control over timing—not on an assumption that imperative Apex is managed by LDS. Call Apex Methods Imperatively

What changes when you use Apex

Transactions and supported operations

Apex is the better fit when the job exceeds UI API’s supported objects or operations, or when the server must apply several record changes atomically. By contrast, calling LDS mutation functions for several records does not combine those calls into one transaction. Salesforce Data Guidelines

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Wired and imperative Apex have different constraints

To wire an Apex method, annotate it with @AuraEnabled(cacheable=true), and make sure it only reads data. A wired Apex method provisions data; imperative Apex is invoked explicitly and returns a single promise result. Use the imperative form for user-triggered work or mutations, while remembering that its result is not thereby brought under LDS cache management. Wire Apex Methods to Lightning Web Components and Call Apex Methods Imperatively

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security is your implementation responsibility

With Apex, design access checks deliberately. Sharing declarations govern record-level access, while database access modes or stripInaccessible() address object and field permissions. Check the guidance for your Salesforce release and API version rather than relying on an assumed default. Secure Apex Classes

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan refreshes when Apex and LDS both appear

Apex results are not managed by LDS, including results from cacheable Apex methods. If a wired Apex result becomes stale, use refreshApex() on the value provisioned by the wire. After an imperative Apex operation, call the Apex method again when you need fresh results; if records in the LDS cache are also affected, call notifyRecordUpdateAvailable(recordIds) to tell LDS those records have changed. A refresh can require a server trip, so refresh when needed rather than reflexively. Wire Apex Methods to Lightning Web Components, Client-Side Caching of Apex Method Results and Salesforce Data Guidelines

Do not treat Apex and LDS as one shared cache. Mixing results can leave components with inconsistent views, including in online or offline scenarios. In the documented case where an application both fetches and searches the same data, Salesforce recommends using GraphQL consistently for both operations. Salesforce Data Guidelines

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

A practical decision sequence

  1. Start with the interface. For a standard record form, use an LDS base component.
  2. Check support. If the object and operation are supported and the UI is custom, use an LDS adapter or function.
  3. Check query shape. Use the GraphQL wire adapter when exact fields, filtering, related records, combined queries or pagination are central to the read.
  4. Check invocation and transaction needs. Use imperative calls when timing is explicit; choose Apex if multiple changes must be atomic or UI API cannot express the operation.
  5. Account for cache and access controls. Decide how stale data will be refreshed and, with Apex, implement the required security behavior.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.