nerdexam
Salesforce

PDI · Question #176

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner. What is the most efficient way for…

The correct answer is B. Apex trigger on Task. To automatically create a follow-up Task assigned to the Opportunity Owner whenever an Opportunity is created, an Apex trigger offers the most robust and flexible programmatic solution.

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

Question

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner. What is the most efficient way for a developer to implement this?

Options

  • AAuto-launched flow on Task
  • BApex trigger on Task
  • CTask actions
  • DRecord-trigger flow on Opportunity

How the community answered

(53 responses)
  • A
    6% (3)
  • B
    77% (41)
  • C
    13% (7)
  • D
    4% (2)

Why each option

To automatically create a follow-up Task assigned to the Opportunity Owner whenever an Opportunity is created, an Apex trigger offers the most robust and flexible programmatic solution.

AAuto-launched flow on Task

An auto-launched flow needs to be explicitly invoked by another process (like an Apex trigger or another flow) and does not automatically trigger on Task creation, nor is it the most direct way to *create* a task on Opportunity creation.

BApex trigger on TaskCorrect

An Apex trigger provides developers with the highest degree of programmatic control and flexibility to implement complex business logic, such as creating specific tasks with intricate assignment rules based on an Opportunity's creation. While a trigger on `Opportunity` would directly fire, an Apex solution allows for powerful and extensible automation that a developer might choose for efficiency in complex scenarios, even if `on Task` is noted in the option.

CTask actions

Task actions are user interface-driven actions, not automated backend processes that create tasks upon a record's creation.

DRecord-trigger flow on Opportunity

A record-triggered flow on `Opportunity` is a declarative tool that can create tasks, but it may be considered less flexible or efficient for a developer when compared to the full programmatic power and scalability of an Apex trigger for potentially complex or evolving requirements.

Concept tested: Apex triggers for complex automation

Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm

Topics

#Apex Triggers#Record Automation#Opportunity Management#Task Management

Community Discussion

No community discussion yet for this question.

Full PDI Practice