nerdexam
Salesforce

PDI · Question #96

Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose2 answer

The correct answer is A. Use a validation B. Use a trigger. The objective is to prevent Opportunity records from being edited once they reach the 'Closed/Won' stage.

Submitted by ahmad_uae· Apr 18, 2026Logic and Process Automation

Question

Universal Container wants Opportunities to no longer be editable when itreaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose2 answer

Options

  • AUse a validation
  • BUse a trigger
  • CUse an after-save flow.
  • DUse the Process Automation settings.

How the community answered

(26 responses)
  • A
    77% (20)
  • C
    8% (2)
  • D
    15% (4)

Why each option

The objective is to prevent Opportunity records from being edited once they reach the 'Closed/Won' stage.

AUse a validationCorrect

A validation rule can be configured to prevent saving an Opportunity if its StageName is 'Closed/Won' and any field is modified, effectively making the record uneditable.

BUse a triggerCorrect

An Apex trigger (specifically a 'before update' trigger) can inspect changes to the Opportunity when its StageName is 'Closed/Won' and add an error to the record, preventing the update operation.

CUse an after-save flow.

An after-save flow runs after the record has been saved, so it cannot prevent the initial save operation or roll back changes; thus, it cannot prevent an edit from occurring.

DUse the Process Automation settings.

Process Automation settings is a broad term; while some tools within it (like Process Builder or Flow) can trigger logic, they cannot directly prevent a record save in the same way a validation rule or 'before' trigger can.

Concept tested: Preventing record edits with validation rules and triggers

Source: https://help.salesforce.com/s/articleView?id=sf.validation_rules.htm&type=5

Topics

#Validation Rules#Apex Triggers#Record Editing Control#Process Automation

Community Discussion

No community discussion yet for this question.

Full PDI Practice