SalesforceLabs / ActionPlansV4

Action Plans encapsulates best practices into reusable task templates.
https://salesforcelabs.github.io/ActionPlansV4/
BSD 3-Clause "New" or "Revised" License
23 stars 11 forks source link

Create Action Plan From Template Apex Action: Creates all Tasks immediately? #120

Open juhalassila opened 1 year ago

juhalassila commented 1 year ago

Describe

Whenever I debug the Flow that has the Create Action Plan From Template Apex Action, I observe that all Tasks of the Action Plan are created immediately.

Repro

  1. Create Action Plan Template with two Tasks: ONE and TWO
  2. Set the controlling Task of TWO as ONE
  3. Copy the Id of the Action Plan Template
  4. Create a Screen Flow with one Action
  5. Set the parent Record Id to an Id of a the Test Account in your Org
  6. Set the Template Id to the Id that you copied above
  7. Save the Flow
  8. Debug The Flow
  9. Navigate to the Test Account
  10. Observe Upcoming and Overdue Tasks in Activity Timeline: both ONE and TWO are there

Expected behavior I'm expecting that only ONE would appear initially. And that TWO appears only after ONE is completed. This happens when I create a new Action Plan for the Account manually via Related Lists > Action Plans >button Create Action Plan

Environment (please complete the following information):

Screenshots

image image image image

juhalassila commented 1 year ago

As a workaround, I created a Flow that does the creation of Action Plans from an Action Plan Template.

irinaIvanova97 commented 1 year ago

I have the same issue when creating action plan from template from a record-triggered flow. All of the tasks defined in the templated are created at once even though there are dependencies between them.