+ Start a Discussion
JLockardJLockard 

Workaround for Workflow Task Implicitly Assigned to Opportunity Ownwer

Hello,

I posted this on the Idea site (http://sites.force.com/ideaexchange/ideaView?c=09a30000000D9xt&id=087300000006xx9&returnUrl=%2Fapex%2FideaList%3Fc%3D09a30000000D9xt%26sort%3Drecent) 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?

 

TIA...

KierenJamesonKierenJameson
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.