Ex: For our opportunities, we're automatically tasking opportunity owners with different tasks per opportunity stage, but we want to require that they complete all tasks for the current stage before changing the stage the next value.
Thoughts?
1 个回答
I am afraid your only option would be an Apex Trigger on the Opportunity object. So the logic is this( just in case if it helps ): - Identify who is making the change to the Opportunity record
- Scan the Database to see if there are any Tasks pending as of now [You will have to find those Tasks of the Current User that deals with the Opportunity Stage associated Tasks by looking at that field on the Task record that would help us to uniquely distinguish such types of Tasks]
- If the COUNT is greater than zero, then you can throw an Error
- You will need an Before Update Apex Trigger on the Opportunity object