Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Action Plan From Template apex action in flow creates tasks without dependencies #151

Open
irinaIvanova97 opened this issue Aug 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@irinaIvanova97
Copy link

Describe the bug
When creating a new action plan from template with the apex action "Create Action Plan From Template", the tasks related to the record are created all at once even though there is a dependency defined in the template.

To Reproduce
Steps to reproduce the behavior:

  1. Go go Action Plan Templates
  2. Create new template
  3. Populate name
  4. Create new task with sample subjects and days after "1", priority normal, send email true, reminder true
  5. Create a second task with sample subjects and days after "1", priority normal, send email true, reminder true. On the controlling task select the task created in the previous step.
  6. Save
  7. Create new record-triggered flow on lead creation.
  8. Call the apex action "Create Action Plan From Template" with the current record id and template name passed
  9. Activate flow
  10. Create lead record
  11. Lead has 2 task created and assigned to the record

Expected behavior
The record to have only the first task, since the second one is dependent on the first and should be generated only after the first one is completed.

Screenshots
image
image

Environment (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Action Plans Version: 4.3
  • Salesforce UI: Lightning Experience
  • Org Edition: Enterprise
@irinaIvanova97 irinaIvanova97 added the bug Something isn't working label Aug 17, 2023
@charliel1981
Copy link

Hello,

i believe i got to the bottom of this issue with workbench. You might find that you originally created an AP and deleted rows of tasks out (potentially in the classic UI - as i did) and the dependencies didnt adjust as they should have.
If you use workbench and look at the action plan template using LabsActionPlans__Action_Plan_Template__c as the filter to the template, more than likely you will see that the LabsActionPlans__Dependent__c may not be correct!

You can then use workbench to fix this issue by updating the record.

This worked for me, hope it helps anyone with the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants