Courseiva
Developer FundamentalshardMultiple SelectObjective-mapped

SALESFORCE-PD1 Developer Fundamentals Practice Question

A developer needs to write a secure SOQL query that prevents unauthorized data exposure by respecting both sharing rules and field-level security. Which TWO approaches can the developer combine to achieve this? (Choose two.)

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

Include the 'WITH SECURITY_ENFORCED' clause in the SOQL query.

Sharing rules are enforced via class keywords, while FLS can be enforced using WITH SECURITY_ENFORCED or Security.stripInaccessible.

Answer analysis

Option-by-option breakdown

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

  • Include the 'WITH SECURITY_ENFORCED' clause in the SOQL query.

    Why this is correct

    WITH SECURITY_ENFORCED enforces field and object-level security checks on SOQL queries.

  • Disable FLS checks in user profile settings before executing queries.

    Why it's wrong here

    Modifying profiles is an admin configuration task, not an Apex development pattern for enforcing security.

  • Execute queries inside an asynchronous @future method.

    Why it's wrong here

    Asynchronous methods run in system context, bypassing user-level sharing rules.

  • Use the 'without sharing' keyword on all transaction controllers.

    Why it's wrong here

    'without sharing' explicitly disables sharing rule enforcement.

  • Define the helper class with the 'with sharing' keyword.

    Why this is correct

    'with sharing' enforces sharing rules at the class level.

About these practice questions

This SALESFORCE-PD1 question is part of Courseiva's 493-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.