Courseiva
User InterfacehardMultiple SelectObjective-mapped

SALESFORCE-PD1 User Interface Practice Question

A developer is reviewing a Lightning Web Component that makes calls to an Apex controller. Which THREE best practices should be followed when designing the Apex methods for LWC consumption? (Choose THREE)

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

Use primitive data types or simple serializable wrapper classes for parameters and return values.

Apex methods for LWC should be cacheable when read-only, handle security/sharing properly, and accept appropriate parameter types.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use primitive data types or simple serializable wrapper classes for parameters and return values.

    Why this is correct

    Correct because LWC requires serializable primitives or wrapper structures.

  • Ensure Apex methods enforce object and field-level security (FLS) where appropriate.

    Why this is correct

    Correct because Apex does not automatically enforce FLS in all contexts unless explicitly checked or queried with WITH SECURITY_ENFORCED.

  • Mark all Apex controller methods as global to allow unrestricted LWC access.

    Why it's wrong here

    Incorrect because public or global is required, but global should be avoided unless necessary (e.g., managed packages); public static is standard.

  • Annotate read-only methods with @AuraEnabled(cacheable=true) to improve performance.

    Why this is correct

    Correct because cacheable methods execute faster and do not consume transaction limits.

  • Pass entire sobject records with complex parent relationships directly from client-side JavaScript without validation.

    Why it's wrong here

    Incorrect because passing complex unvalidated objects is prone to errors and governor limit issues.

About these practice questions

One of 493 original SALESFORCE-PD1 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Salesforce exam blueprint

This SALESFORCE-PD1 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 SALESFORCE-PD1 exam.