function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ashita ThankiAshita Thanki 

Workflow and Trigger Query

For the following question:


Universal Containers has many customers that repeat the same purchase on a regular basis. These customers are classified as a repeat account type. Sales management wishes to use Salesforce to automate repeat opportunities. What should a consultant recommend to meet this requirement? 
a. Develop an Apex trigger to set an opportunity revenue schedule that automatically sets up a new opportunity for repeat a accounts when it reaches closed/won stage. 
b. Configure a workflow rule for repeat accounts that sends a reminder task to the sales representative to create a new opportunity when it reaches closed/won stage. 
c. Configure a workflow rule for repeat accounts that inserts a copy of an opportunity for the sales representative when it reaches dosed/won stage. 
d. Develop an Apex trigger for repeat accounts that inserts a copy of an opportunity for the sales representative when it reaches dosed/won stage. 

Why do we need to develop a trigger when the same insertation operation can be performed with the help of a workflow rule
(Please help me undestand why is D the correct choice for this instead of C?)
Abdul KhatriAbdul Khatri
You cannot insert Records through workflow. The only option for creating any record through workflow is the New Task.

User-added image