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
Kevin Caputo 3Kevin Caputo 3 

Help with how to

 When creating a task in an opportunity in the Lightning Opportunity page and assigning the task to another person (aka - a delegated task) we are getting error messages 1461874646-144188 (-620721962) which is preventing the Salesforce users from creating the task. After a lot of digging, I pretty sure the error is being cause by an opportunity validation rule that is failing in a backend flow program. The flow program creates an email alert to the Creator of the task when the task become overdue. Interestingly the user does not get this error when they assign the task to themselves.  

I am not sure why the the Opportunity Validation Rules is getting triggered as the user is creating a task. FYI on the backend programs:
  • There is Process Builder program that get triggered when the Task is created and it schedule when the Task Due Date is exceed a call to the headless flow program which sends an email alert to the Task Creator to tell the creator that the task is overdue.
  • The headless Flow program does not write to the Opportunity record however it reads the Opportunity record to get the opp id and name to include in the email alert.  
My questions are:
  1. Is there a way that the backend flow program can by pass the Opportunity Validation Rules? 
  2. Is there a way that in the headless flow that the program can check the Closed Date & Stage (ie check the same logic as the validation rule) and prompt the user that they need to first changed the closed date?
Scott Haleo 4Scott Haleo 4
Hi Kevin,

You can modify the process builder or flow to include the criteria that like when it meets all validation then only it will fire.

Let me know if any other issues?

Scott Haleo