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

Workaround for Workflow Task Implicitly Assigned to Opportunity Ownwer


I posted this on the Idea site ( as well, but wondered if anyone has any suggestions on how to avoid the following "issue" I'm having with a Workflow Task.


Basically, I am trying to create a Task to be assigned to the user in a particular Role on the Sales Team.  However, if no user is defined in that Role, the Task is still created and implicitly assigned to the Opty Owner.  I can see scenarios where I'd be glad that is the functionality, but in the current case, I am already creating a Task for the Opty Owner from the same Workflow.  So, when no user is defined for the Sales Team role I am trying to create a Task for, the Opty Owner ends up with two identical tasks and, as you can imagine, this would not sit well with our Sales folks.


Any advice on how to get this to work so that the Opty Owner always gets a Task and the Task for the Sales Team member is only created when the at least one user is assigned to that Role?



Unfortunately you can't do this with a single Workflow Rule. You can have a workflow that runs when you have a user defined in the role (WFR-A), and another when they don't (WFR-B).  WFR-A would have two WF actions, one creating a task for both the role and the opp owner. WFR-B would only have one action - creating a task for the opp owner. 

You coudl also do this with process builder, visual flow, or Apex Trigger.