Coder Social home page Coder Social logo

salesforcelabs / actionplansv4 Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 10.0 3.29 MB

Action Plans encapsulates best practices into reusable task templates.

Home Page: https://salesforcelabs.github.io/ActionPlansV4/

License: BSD 3-Clause "New" or "Revised" License

Apex 69.67% JavaScript 22.41% Shell 1.56% CSS 1.37% HTML 4.99%
lightning salesforce

actionplansv4's People

Contributors

dependabot[bot] avatar dschach avatar salesforcecalvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actionplansv4's Issues

Task Dependency Error when creating Automate Create Action Plan with a Flow

Describe the bug
I have Templates with 10 Subjects that are Dependent on another Subject. When creating the Action Plan Templates automatically on the Opportunity record with a flow. All Tasks are populated. The Tasks that are dependent on the Controlling Task is also populated.

Expected behavior
When the Tasks are automatically created, all task that are not dependent on another task is populated. After completing the controlling task, the dependent task are populated afterwards.

Environment (please complete the following information):

  • OS: MacOS

  • Browser : Chrome

  • Action Plans Version v4 : Version 4.3

  • Salesforce UI

  • Classic

  • [ x] Lightning Experience

  • Org Edition

  • [x ] Developer

Assigned to Field - Allow Queues

Is your feature request related to a problem? Please describe.
Unable to assign the tasks to a queue of users

Describe the solution you'd like
allow the ability to assign the tasks to a queue of users rather then just individual

Describe alternatives you've considered
Considered creating a chatter free user and assigning to that but then unable to view those tasks

Additional context
Add any other context or screenshots about the feature request here.
image

Show Task Owner needs better rules

Right now, the lookup is displaying sporadically, and there are many criteria to consider.
The project requires a central place where the rules can be put in code, passing in an Action Plan (for the Id and template Id) and an Action Plan Task. Combine that with the custom setting and object permissions to determine if the running user should be able to edit the owner.
Examples:

  • If no owner, and setting is to parent record owner, show placeholder.
  • If owner and user cannot modify field, show owner
  • If no owner and does not default to parent owner, and cannot edit, show current user read-only. If can edit, show current user and allow to reassign
  • And more...

Reminder Time resets

Reminder Time resets

Steps to re-create

  1. Create New Action Plan
  2. Adjust the reminder time on some tasks
  3. Add a new task
  4. Time will reset to 8am

Expected behaviour: Time remains at the correct time you selected

Workaround: only set the time for reminders after adding all tasks to an action plan or action plan template

Screenshots
image

Environment :

  • OS: Windows

  • Browser:chrome

  • Action Plans Version:
    4.2.1

  • Salesforce UI :
    Lightning Experience

  • Org Edition
    Unlimited

Assign APTasks to Queues

Is your feature request related to a problem? Please describe.
I cannot assign APTasks to Queues

Describe the solution you'd like
Allow assignment of Tasks to Queues when the parent record is owned by a queue, or allow APTasks to be assigned to queues.

  • Update the lookup to include queues, probably filtering for that related object type. Include error handling if the queue is not allowed for tasks and the parent object. This may need a text field for APTask ownerId, though this would make reporting quite difficult. Using APTask.OwnerId is not an option due to the Master-Detail relationship.
  • I would rather not clear the User field if the Task is owned by a Queue, as that may confuse reporting, but here, reporting is inaccurate, so this is a significant lift.

Describe alternatives you've considered
Assigning the APTask to some user and then using Flow on Task to reassign to the parent record owner. (This would require a text field on ActionPlan for the OwnerId of the parent record. How do we handle this when the parent owner changes?)

Additional context
There are a lot of considerations for this, so it is low-priority. For now, updating the Task OwnerId using Flow or a trigger may be the best option, but those values may be overwritten if the APTask is edited.

For now, we have blocked the APTask owner from updating to a queue, and the record will keep the existing value. The hope is that this will not create a loop that will overwrite the Task if the User field is still a User when the Task owner is a Queue.

Reopening a Controlling Task causes Dependent Tasks to be deleted

Describe the bug
If a Controlling Task is reopened after it has triggered the creation of Dependent Tasks, then any update to the Dependent Tasks while the Controlling Task is open causes Action Plans to DELETE the dependent task that was just edited

To Reproduce
Steps to reproduce the behavior:

  1. Create an Action Plan that has at least 1 dependent Task
  2. Complete the Controlling Task so that the Dependent Task is created
  3. Reopen the Controlling Task
  4. Change the Status of the Dependent Task
  5. Refresh the record page to observe that the Dependent Task has now been deleted.

Expected behavior
The Dependent Task should accept the edit and no records should be deleted.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: OSX, Windows

  • Browser: Chrome 

  • Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages): LabsActionPlans 4.3

  • Salesforce UI

  • Classic (not tested)

  • [ X ] Lightning Experience

  • Org Edition

  • Personal

  • Contact Manager

  • Professional

  • [ X ] Enterprise

  • Unlimited

  • Developer

Additional context

OwnerID Error on Action Plan Related to Custom Object

Describe the bug
When trying to create an Action Plan on a custom object (child of Account), I cannot assign the tasks (by manually setting the User in the template or when custom settings are set to assign to current user) and receive the following error message: "No such column 'OwnerId' on entity 'Project__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to an Action Plan Template and click New Action Plan
  2. Fill in the Action Plan Name, change the Related to my custom object, and enter the name of the custom object record.
  3. When I try to save the Action Plan, I get the error message above.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Environment (please complete the following information):

  • OS: MacOS 13.1

  • Browser Chrome

  • Action Plans Version: 4.2.1

  • Salesforce UI

  • Classic

  • [ X ] Lightning Experience

  • Org Edition

  • Personal

  • Contact Manager

  • Professional

  • [ X ] Enterprise

  • Unlimited

  • Developer

Additional context
A Related Lookup to my custom object has been added to the Action Plan object and that custom object has been added to the Action Plan Field Set. The Action Plan Custom Settings for "Unassigned Task Assigned to Record Owner" has been unchecked. I've tried setting the User manually in the template with no success. I also tried adding a custom field called "OwnerID" on the custom object as a Formula (Text) field which pulled in the OwnerID from the Account (Parent Object).

"Cannot locate Apex Type for ID"

Apex Error

Steps to re-create

  1. Create a new action plan from the Action Plans tab
  2. Add a task to the action plan
  3. Associate a record with the action plan
  4. Attempt to Save
  5. An error will display "Cannot locate Apex Type for ID"

Expected behavour: action plan saves successfully

Workaround: always attach an action plan by first navigating to a record and Creating an action plan from the related list. OR attach the record as your first step when creating an action plan (before adding any tasks)

Screenshots
image
image

Environment (please complete the following information):

  • OS: Windows

  • Browser chrome

  • Action Plans Version 4.2.1

  • Salesforce UI

  • Lightning Experience

  • Org Edition

  • Unlimited

Codecov results not uploaded

Describe the bug
The workflow is running, but Codecov is not getting results

To Reproduce
Steps to reproduce the behavior:

  1. Create, edit, approve PR
  2. No Codecov

Expected behavior
Codecov website should show coverage, and a report should be in GitHub

Additional context
Allow running on any branch

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

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):

  • Win 10
  • Chrome 112.0.5615.138
  • Action Plans v4 version 4.3 Installed 2023-05-01
  • Salesforce UI = Lightning Experience
  • Org Edition = Enterprise

Screenshots

image
image
image
image

New Feature Request: Custom Task Fields For Action Plan / Action Plan Templates

Is your feature request related to a problem? Please describe.
This is not a problem/issue/bug, just a missing feature.

Describe the solution you'd like
When creating a new Action Plan or Action Plan Template, we would like to include custom fields in the Task definition. While we discourage the use of process-specific custom fields in order to avoid the relatively low limits for Activities, we do have a need for some custom dependent picklists that we use across record types. One possible solution could be to leverage custom metadata types to maintain a list of field API names that are displayed dynamically in your VF page override. Specifying column order, record type, and inclusion of dependent picklists would be ideal (i.e. picklist value dependencies based on record type and controlling picklists should be accurately reflected).

Describe alternatives you've considered
Combining values into the standard Type field is an option for some of the data, but our users prefer picklist dependencies over longer value lists, and we try to avoid additional record types when we can. We also will not put data into the Type field that does not belong there, so it will not solve all of our use cases. As a custom alternative, we could supplement the existing functionality by creating new custom fields on APTemplateTask to house the custom field values and update the new Tasks accordingly whenever it is related to an APTask. This would not be an ideal user experience though because it is a disjointed process to generate the data instead of doing it all from the Template creation page.

Additional context
Add any other context or screenshots about the feature request here.

Feature Request: Order object

Description:
Ability to assign an action plan to an Order object type.

Rationale:
Because the Order object typically relates to delivering whatever was sold, an action plan on an Order (e.g. after execution of a contract) could help with the multiple steps that exist even in very basic scenarios (e.g. following up on delivery, billing, etc.).

While this could be seen as overlapping into Service cloud, because the Order object does exist in Sales cloud (and I've seen it used often), having an action plan for Orders in this version would be tremendous.

Your very cool work-around for dealing with multiple-Whats would be stretched, but I'd argue that the order object, over any other, deserves it—if technically possible.

OrderExample

OwnerId field not found

Describe the bug
When using the action plan on a child object (with master-detail relationship which doesn't have OwnerId), the action plan failed with the error OwnerId field not found.

To Reproduce
Steps to reproduce the behavior:

  1. Enabled Unassigned Task Defaults to Record Owner
  2. Create a new object MyObject__c
  3. Create a master detail lookup field on the object, target can be any existing salesforce object e.g., Account
  4. Setup the action plan template and action template task for the new object MyObject__c
  5. Create a flow that invoke the action plan creation (https://github.com/SalesforceLabs/ActionPlansV4#flow)
  6. Create an object action that calls the flow
  7. Create a new MyObject__c record and use the object action to create the action plan

Expected behavior
The action plan task should be created and assigned to parent owner

Screenshots
na

Environment (please complete the following information):

  • OS: [e.g. OSX, Windows]
    Windows

  • Browser [e.g. chrome, safari]
    chrome

  • Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages)
    4

  • Salesforce UI
    Lightning and classic

  • Org Edition
    Enterprise

Additional context
na

TaskAPTask Field - Lookup deletion prevention

Is your feature request related to a problem? Please describe.
Because action plans create tasks, those tasks become orphaned (from the action plan) if the action plan is subsequently deleted. This can cause a confusing lack of context, or worse multiple instances of the same task if an enthusiastic user creates, deletes, and recreates action plans against the same records.

Describe the solution you'd like
Change "What to do if the lookup record is deleted?" option for the TaskAPTask field on Task object to be user selectable. An admin could then prevent action plans from being deleted prior to the user cleaning up any created tasks.

Describe alternatives you've considered
A manual installation of the package would likely allow the change, but this would seem to be a standard need.

Additional context

Currently the option is completely disabled on the field:

Currently restricted

As an admin, would prefer to have the standard option to prevent deletion of lookup:

Standard option

Error when Delete an Action Plan from List View

Describe the bug
When delete an action plan from the list view of Action Plans, got failed with the error message below.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Action Plans'
  2. Select the target action plans
  3. Click on 'Delete Action Plans'
  4. See error in below

Expected behavior
Action Plan(s) should be deleted accordingly.

Screenshots
Screenshot 2022-06-24 221116

Environment (please complete the following information):

  • OS: Windows

  • Browser: Edge

  • Action Plans Version 4.1

  • Salesforce UI

  • Lightning Experience

Too many query rows exception

Describe the bug
When I edit Action Plan, add a new Task, and save, the "LabsActionPlans: Too many query rows: 50001" exception is thrown.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Action Plan record
  2. Click Edit
  3. Add new Task and populate the required field
  4. Click Save
  5. See error

Expected behavior
Action Plan should be saved without any errors.

Screenshots
image

Log File
log.txt

Additional Info
I think the exception is thrown in ActionPlansBuilderUtilities class in the line 190: for (Task tmpTask : [SELECT Id, TaskAPTask__c, Subject FROM Task WHERE TaskAPTask__c IN :mapAP.keySet()]) {. When mapAP contains null as a key, the number of Tasks returned by query exceeds 50000, and the exception is thrown. You should update the WHERE part of your query to exclude Tasks with empty TaskAPTask__c field.

Unable to Reassign Task to Queue

Describe the bug
A clear and concise description of what the bug is.
The documentation suggests that after a Task has been created via the package, it can then be reassigned to a Queue "any other way you'd like...". I have tried to do this via the UI, via API, and via the packages invocable Apex class with a Flow, all of which is generating the same Error message:

LabsActionPlans.APTask: execution of AfterUpdate caused by: System.DmlException: Upsert failed. First exception on row 0 with id a461x0000009hmDAAQ; first error: FIELD_INTEGRITY_EXCEPTION, Assigned To: id value of incorrect type: 00G1x00000Aqu2PEAR: [LabsActionPlans__User__c] (LabsActionPlans)

Could be something silly that I am doing or not doing, just hoping to have some feedback if you expect this to work or not.

To Reproduce
Steps to reproduce the behavior:

  1. Create an Action Plan Template with Template Tasks
  2. Create a Case, and then a new Action Plan using the AP Template
  3. Tasks are successfully added to the Case, assigned to the users identified in the Template Tasks.
  4. View one of the new Tasks, and change the Assigned To user to a Queue.
  5. On Save, the error is generated preventing save.
  6. Attempt to update the OwnerId on Task via API, get the same error.
  7. Attempt to generate the Action Plan and update the new Tasks via Flow and invocable Apex action, get the same error.
  8. If removing the Task relationship to AP Task, then the OwnerId can be changed to a Queue, but if reestablishing the relationship with AP Task will get the same error.

Expected behavior
Should be able to reassign the standard Task manually to a Queue via UI, API, or declarative automation such as Flow.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Action Plans Version: 4.2.1
  • Salesforce UI: Lightning Experience
  • Org Edition: Unlimited

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

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

Install Failure in PE Environment

Describe the bug
Today I attempted to install the Managed AppExchange Package into a PE sandbox, and received multiple failure messages related to Apex Classes:

Missing feature
Installing this package requires the following feature and its associated permissions: Apex Classes

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to Setup--> Home
  2. Search for AppExchange
  3. Click on AppExchange Marketplace in left sidebar
  4. Search for "Action Plans"
  5. Click on Action Plans V4
  6. Click on Get it Now
  7. Follow prompts to authenticate and choose environment
  8. Eventually land on Installing Package status page
  9. Wait for email notification that package has installed
  10. Receive Install Failed message instead

Expected behavior
I expected the managed package to send me a nice "successfully installed" message.

Screenshots
See attached PDF
ActionPlans V4 Install Failure - Prfessional Edition.pdf

Environment (please complete the following information):
Professional Edition Dev Sandbox

Additional context
nope.

Lookup field issues

Lookup field to select parent record in create Action Plan flow shows nothing. Lookup field to select AP Template in single record flow shows nothing.

Sorry this isn’t precise, I’m working from memory here.

  1. Go to an action plan template
  2. Click action to create action plan
  3. Place cursor in lookup field to select parent record (Account, Oppty, etc)
  4. Type a few characters to search for a k own account
  5. Search result your component appears, but there is no data returned and it’s all tiny

Expected behavior
When typing an account name In the lookup search field, expect a list of matching options
When typing in an Action Plan template name in the lookup search field, expect list of available AP templates

Screenshots
Sorry, I don’t have access anymore

Environment (please complete the following information):
Chrome browser
Mac OS
Professional Edition org

Additional context
Add any other context about the problem here.

Task assignment email not triggered

Describe the bug
Task assignment email not triggered.

To Reproduce
Steps to reproduce the behavior:
Login as userA

  1. Go to 'case related list action plan'
  2. Click on 'create case action plan'
  3. Create an action plan and add a task to userB, make sure send email is checked.
  4. No task assignment email was triggered to userB

Expected behavior
task assignment email was triggered to userB

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [ Windows]
  • Browser [chrome,]
  • Action Plans Version [4.2]

Additional context
UserA manualy create task and assigned to UserB, a task assigment email is triggered.

ActionPlanCreateInvocable.makeActionPlanFromTemplate() won't create multiple Action Plans for the same record

We have 4 Action Plan Templates set up in our sandbox with "Criteria Change" in the name, and are trying to assign all 4 of them to a single custom object record. We're running the following script

Map<Id,LabsActionPlans__ActionPlanTemplate__c> actionTemplates = new Map<ID, LabsActionPlans__ActionPlanTemplate__c>([SELECT ID, Name, LabsActionPlans__Description__c, LabsActionPlans__SkipWeekends__c,
LabsActionPlans__SkipDay__c FROM LabsActionPlans__ActionPlanTemplate__c WHERE Name like '%Criteria Change%']);

List<LabsActionPlans.ActionPlanCreateInvocable.CreateActionPlanRequest> requests = new List<LabsActionPlans.ActionPlanCreateInvocable.CreateActionPlanRequest>();

for(LabsActionPlans__ActionPlanTemplate__c ap: actionTemplates.values()) {
    LabsActionPlans.ActionPlanCreateInvocable.CreateActionPlanRequest req = new 
    LabsActionPlans.ActionPlanCreateInvocable.CreateActionPlanRequest();
    req.templateNameOrID = ap.Id;
    req.relatedRecordID = 'a1e7e000007j37gAAA';
    req.daysToActionPlanStart = 1;
    requests.add(req);
}
system.debug('requests : ' + requests);
List<Id> resultIDs = LabsActionPlans.ActionPlanCreateInvocable.makeActionPlanFromTemplate(requests);
system.debug('resultIDs : ' + resultIDs);

The first debug statement prints (formatted for readability, note templateNameOrID is unique in each of the 4 cases):

09:55:42:014 USER_DEBUG [14]|DEBUG|requests : (
CreateActionPlanRequest:[daysToActionPlanStart=1, relatedRecordID=a1e7e000007j37gAAA, templateNameOrID=a0I7e000009i8AhEAI], 
CreateActionPlanRequest:[daysToActionPlanStart=1, relatedRecordID=a1e7e000007j37gAAA, templateNameOrID=a0I7e000009i8AcEAI], 
CreateActionPlanRequest:[daysToActionPlanStart=1, relatedRecordID=a1e7e000007j37gAAA, templateNameOrID=a0I7e000009i8AwEAI], 
CreateActionPlanRequest:[daysToActionPlanStart=1, relatedRecordID=a1e7e000007j37gAAA, templateNameOrID=a0I7e000009i8ArEAI])

The second debug statement however prints (note the 4 identical Action Plan IDs:

09:58:22:798 USER_DEBUG [16]|DEBUG|resultIDs : (a0J7e000006bBRHEA2, a0J7e000006bBRHEA2, a0J7e000006bBRHEA2, a0J7e000006bBRHEA2)

Ultimately one 1 Action Plan is ever created on the target custom object record.

Action Plan Automation, Flow via CreateActionPlanfromTemplate

Discussed in #109

Originally posted by tatertotsey March 23, 2023
Hi,
I am trying to create an Action Plan depending on pre-created Action Plan Template via flow.

If an Opportunity's stage changed into Closed, the flow is triggered and creates Action Plan from Template. The issue is, when the Action Plan is created via flow, the controlling fields of the tasks become different from the chosen template.

If I create the Action Plan manually, the depending fields seems exact to the ones in the Template, so no problem there.

What should be the solution to this, what am I missing while creating the flow?
Thank you!

Tasks Created from different Action Plan

Describe the bug
Occasionally I have users tell me they have been assigned tasks from another user on the team and before their controlling tasks have been completed. This occurs when the first user is working with their own tasks and closing tasks. I have a feeling this is related to the action plan templates feature and the task dependencies. It seems like it is selecting controlling tasks that are not related to the action plan the user is working on. I have attached some screenshots below.

Screenshots
As you can see below, the action plan has 0 completed tasks. However, the 3 tasks with controlling tasks have been created, all by the 1st user that was working on their own task lists.
image

Here is the task the first user marked completed which triggers the next task "Check-in call". It was closed on 11/2/2023 at 10:21AM.
image

This task is the one that was created by the prior user and was created at the exact same time as their prior task was closed:
image

  • Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages)

  • We are on Version 4.2.1

  • Salesforce UI

  • Lightning Experience

  • Org Edition

  • Enterprise

Additional context
I haven't been able to run any advanced debugging logs yet to try and pinpoint the issue exactly, but this is defintely happening for multiple users and action plans. It seems to be an issue with the code that creates an action plan task when dependent tasks are marked completed.

Lookup dropdown not populating (templates, opportunities, accounts, etc)

When using SF Lightning (professional) when creating templates unable to lookup and assign users to tasks.

Screen Shot 2022-05-18 at 4 53 23 PM

When trying to assign an action plan template to an account/opportunity/anywhere unable to search for templates to add.

Screen Shot 2022-05-18 at 4 53 03 PM

The workaround I found is to switch to SF Classic in order to apply any action plan templates to opportunities/actions/etc or to be able to assign users to tasks in an action plan template.

Using:
Mac OS 12.4
Salesforce Professional

Browsers tested:
Safari 15.5 (17613.2.7.1.8)
Google Chrome 101.0.4951.64

No Action Plan Template Lookup From New Button on Related List

Describe the bug
When clicking on the New button from the Action Plan related list on a record page, the screen doesn't include the Action Plan Template Lookup Field.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a record page that includes the Action Plan related list.
  2. Click on New button on the Action Plan related list.
  3. At the top of the page, the Action Plan Template Lookup is missing.
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
From Action Plan Related List > New:
image

From Record Page > Create New Action Plan:
image

Environment (please complete the following information):

  • OS: Windows

  • Browser: Chrome

  • Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages)

  • Salesforce UI
    Lightning Experience

  • Org Edition
    Enterprise Edition

Email notifications not being received

When the email checkbox is ticked for tasks related to an action plan users are not receiving email notifications

To Reproduce
Steps to reproduce the behavior:

  1. Create Action Plan record
  2. Create related task (email = true, assigned to is a different user)
  3. save record

Native email notifications are not received.
I have verified that tasks created in the standard way are sending notifications via email.
I have verified the following settings:

  • Enable User Control over Task Assignment Notifications = true
  • User settings are configured to receive emails when someone assigns them a task
  • Allow Flow to send delegated task notifications on records created through Apex = true

I would expect an email notification to be sent to the user notifying them that a new task has been assigned to them.

Documentation Update: Custom Object instructions missing namespace prefix in code snippets

  • 1. Under the section To Start Using an Object with Action Plans the following code snippet for the the custom object trigger
ActionPlansTriggerHandlers.actionPlansSObjectTriggerHandler( 'Custom_Object__c' )

is missing the namespace reference and should be updated to

LabsActionPlans.ActionPlansTriggerHandlers.actionPlansSObjectTriggerHandler( 'Custom_Object__c' )
  • 2. Under the section Adding a New Custom Object Action Plan button to the Action Plan object the following code snippet for the button URL
{!URLFOR( $Action.ActionPlan__c.New, null, [refType="CustomObject__c", refId=CustomObject__c.Id])}

is also missing the namespace prefix and should be updated to

{!URLFOR( $Action.LabsActionPlans__ActionPlan__c.New, null, [refType="CustomObject__c", refId=CustomObject__c.Id])}

Create Multiple APs from Custom Object List View throws error: Attempt to de-reference a null object

Describe the bug
Followed installation guide and process for a managed package's custom object configuration. Single button from related list on custom object works without any issue. Receiving the following error from a list view button attempt.

Attempt to de-reference a null object
An unexpected error has occurred. Your solution provider has been notified. (LabsActionPlans)

I was able to decipher the first part of the process with the page redirect and if I manually populated the URL parameters the page correctly

/apex/ActionPlanCreation?refType=CUSTOM_OBJECT__c&retUrl=%2Fa3Z%2Fo&refId=a3Z7h000000CD4BEAW,a3Z7h000000CEoIEAW

To Reproduce
Steps to reproduce the behavior:

  1. Follow guide to add lookup field on ActionPlan__c to custom object and add field to the fieldset.
  2. Follow guide to create the Visualforce page for the custom object
  3. Follow guide to create the list view button for the custom object and add it to the list views
  4. Navigate to custom object list view (must have 1+ records), select 1+ records, and click the list view button

Expected behavior
Navigation to /apex/ActionPlanCreation with parameters for the page to work without throwing an error.

Screenshots
N/A

Environment (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 4.2.0

Additional context
Happy to screenshare for a review to make sure nothing is my user error.

New Feature Request: Template Task Sorting

Is your feature request related to a problem? Please describe.
When tasks are added or adjusted to an existing action plan template, there is no easy way to reorder them as desired. This makes reviewing the template difficult, especially over multiple, subsequent revisions.

Describe the solution you'd like
A "sort" button similar in functionality to the standard "sort" button on Quote Line items.

Describe alternatives you've considered
Create a report on action plan template tasks, display the TaskIndex field and manually edit into the sequence desired.

Additional context
Example

Hitting CPU Limits at only 200 tasks - ?

We are hitting CPU timeouts with task list template with approx 190 items - we have to split them which is not ideal. Any thoughts on why ? This doesn't seem like a large number for a task list - particularly for larger orgs or more complex use cases.
Error happens when trying to create the list from the template

Unable to delete existing Action Plan(s) with 'Delete Records' Flow element

Describe the bug
I have a Record-Triggered Flow set up to manage Action Plans created from AP Templates against Opportunities. The AP that should be running is based on the Stage of the Opportunity. When the Stage changes, I need any/all previous AP against that Opportunity to be closed/deleted/cancelled so that only the one for the current stage is running.

For example:

  • New Opportunity (using IsNew() to identify) -> Create an AP from APTemplate1
  • Stage changes from New to Stage2 -> Close/cancel/delete current APs against the Opportunity AND create an AP from APTemplate2
  • Stage changes to Stage3 -> Close/cancel/delete current APs against the Opportunity AND create an AP from APTemplate3
  • and so on

To manage the creation of the Action Plans against the Opportunity, I'm using the invocable Flow Action within my Record-Triggered Flow. This part works exactly as expected.

What does not work is deleting the existing APs on the Opportunity using a "Delete Records" element within the Flow. I get the following error from Flow.

(line breaks added for ease of viewing)
Error element Delete_Previous_Action_Plans (FlowRecordDelete).
The flow tried to delete these records: a6Sxxxxxxxxxxxxxxx. This error occurred:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: LabsActionPlans.ActionPlan:
execution of BeforeDelete caused by: System.DmlException: Delete failed.
First exception on row 0 with id 00Txxxxxxxxxxxxxxx; first error:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, LabsActionPlans.APTask:
execution of BeforeDelete caused by: System.DmlException: Update failed.
First exception on row 0 with id a6Pxxxxxxxxxxxxxxx; first error:
FIELD_CUSTOM_VALIDATION_EXCEPTION, Error when deleting newly-dependent Task related to APTaskTemplate:
Delete failed. First exception on row 0 with id 00Txxxxxxxxxxxxxxx;
first error: SELF_REFERENCE_FROM_TRIGGER,
Object (id = 00Txxxxxxxxxxxxxxx) is currently in trigger LabsActionPlans.APTask,
therefore it cannot recursively delete itself: []: [] (LabsActionPlans): [] (LabsActionPlans).
You can look up ExceptionCode values in the SOAP API Developer Guide.

To Reproduce
Steps to reproduce the behavior:

  1. Create multiple Action Plan Templates
  2. Go to Setup > Process Automation > Flows
  3. Click on 'New Flow'
  4. Select 'Record-Triggered Flow'
  5. Select the desired object (Opportunity, for me)
  6. Add a 'Get Records' element to look for existing Action Plan records related to the triggering record. Save the results in a collection variable.
  7. Add a 'Decision' element to check that the collection resource has content (I've used an Assignment element to set a number variable to the count of records contained in the collection)
  8. Add a 'Delete Records' element to delete the records contained in the collection
  9. Save your Flow and run a debug to test
  10. See error

I've included two screenshots showing the relevant portion of the Flow build.
Screenshot from 2024-01-24 13-09-06

Screenshot from 2024-01-24 13-09-27

Expected behavior
I would expect the 'Delete Records' element in a Flow is able to successfully delete any Action Plans, including uncompleted AP Tasks and Tasks, without error.
Or I would expect another Flow Action that can be used to cancel/close/delete any Action Plan.

Screenshots
This screenshot shows the error.
Screenshot from 2024-01-24 13-10-03

Environment (please complete the following information):

  • OS: multiple

  • Browser: multiple, mostly Chromium-based (Edge, Brave, Chrome)

  • Action Plans Version: 4.3

  • Salesforce UI

    • Classic
    • Lightning Experience
  • Org Edition

    • Personal
    • Contact Manager
    • Professional
    • Enterprise
    • Unlimited
    • Developer

Additional context
N/A

Unable to see Type in my layout for Action Plans or Action Plan Templates

It looks like I am unable to see the Type field when creating or editing an Action Plan or Action Plan Template.

To Reproduce

  1. Go to 'Action Plans' or 'Action Plan Templates'
  2. Select 'New'
  3. Type is missing in the table.

Expected behavior
Based on screenshots I would think I should see the Type field.

Screenshots
image

Environment (please complete the following information):

  • Sandbox, Instance CS126

  • Browser: Chrome and Edge

  • Action Plans Version 4.2.1 originally, then we made another sandbox copy and did the full install from Github, up to 4.3 version and still not seeing tasks.

  • Salesforce UI: Lightning Experience

  • Org Edition: Unlimited

Additional Info: I do see Type in the completed Template, it is blank:
image

New Opportunity Action Plan - Not Loading Templates

Describe the bug
When I go to add an opportunity action plan, none of the templates show up in the search to select from. I have made the templates public and have ensured admin permission set. However, if you enter the first part of template name and hit the enter button in the template search, it selects the template name but does not fill the action plan with the template information.

To Reproduce

  1. Go to opportunity
  2. Click Create Opportunity Action Plan from Action Plan related list
  3. Try to enter/search for an existing action plan template
  4. No results appear

Expected behavior
To see the all action plan templates to choose from.

Screenshots

  1. Entering a search term in the template search field:
    Screenshot_20230104_060647
    url)

  2. Hitting enter on the search term:
    Screenshot_20230104_060711

Environment (please complete the following information):

  • Windows 11 Pro
  • Chrome 108.0.5359.125
  • Action Plans v4.2.1
  • Salesforce Lightning
  • Enterprise Edition

Action Plans Creator permissions don't have access to edit AP Template field

Describe the bug
Action Plans Creator permission set > Field permissions for LabsActionPlans__ActionPlan__c.LabsActionPlans__Action_Plan_Template__c are set to read only. When user with the Action Plans Creator permission set create an action plan, they should be able to select an Action Plan Template to create it from. Currently that field is not accessible.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Action Plans Related List
  2. Click on the button to create AP form template
  3. Scroll down to the first field to select a template
  4. See error the field is not an active combo box, rather only white space

Expected behavior
The Creator user should be able to select the Action Plan Template, just like user with the Action Plans Admin can

Screenshots
If applicable, add screenshots to help explain your problem.

Action Plans Creator
Action Plans Admin

Environment (please complete the following information):

  • OS: [e.g. OSX, Windows]

  • Browser [e.g. chrome, safari]

  • Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages)

  • Salesforce UI

  • Classic

  • Lightning Experience

  • Org Edition

  • Personal

  • Contact Manager

  • Professional

  • Enterprise

  • Unlimited

  • Developer

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.