Custom task weighting gives you ultimate flexibility in setting your tasks' weights, so that you are in control of how much they contribute to project (and task group, if applicable) progress.
While the ways to configure and automate custom task weighting are endless, one common use case is to use the number of checklist items to represent the related task's weight. This can be automated using process builder.
Create a Custom Roll-Up Field [Admin]
The first thing that you will need to do to build this automation is create a custom roll-up field on the TaskRay Task object.
- From Setup, navigate to:
- Lightning: Objects and Fields | Object Manager.
- Classic: Create | Objects.
- Click on the TaskRay Task object.
- Under Fields and Relationships, click on New.
- Select Roll-Up Summary and click Next.
- Enter Field Label (e.g. "Count of Checklist Items"). The Field Name should automatically populate. Optionally, enter Description and Help Text.
- Click Next.
- For Summarized Object, select TaskRay Checklist Items.
- Under Select Roll-Up Type, select Count.
- Under Filter Criteria, select All Record Should be Included in the Calculation.
- Click Next.
11. Using the checkboxes, edit field-level security, if necessary. Click Next.
12. Select if you want to add the field to the Project Task Layout (in Salesforce) and click Save.
Create a New Process Using the Process Builder [Admin]
The customization is set up using the Lightning Process Builder. If you would like to read more about setting up other automations in TaskRay using the Lightning Process Builder, see the Automate TaskRay Using the Lightning Process Builder article.
Create a New Process
- From Setup, navigate to:
- Lightning: Process Automation | Process Builder.
- Classic: Create | Workflow & Approvals | Process Builder.
- Click New.
- Enter the Process Name, API Name, and Description.
- For The process starts when field, select A record changes.
- Click Save.
Select the Object for the Process
The first thing that you need to do is select the object that will trigger the automated process. In this case, we will select the TaskRay Task object, because that is where the initial action will take place.
- On the canvas, click on + Add Object.
- For the Object field, select TaskTay Task.
- Under Start the process, select When a record is created or edited.
- Click Save.
Define the Criteria that Triggers the Process
The next part of building the process is to define the criteria that will trigger the process. In this case, it will be a change to the roll-up summary field.
- On the canvas, click on + Add Criteria.
- Enter the Criteria Name.
- Under Criteria for Executing Actions, select Conditions are met.
- Under Set Conditions, select the following:
- Field = [TASKRAY__Project_Task].Count_of_Checklist_Items__c
- Operator = ISCHANGED
- Type = BOOLEAN
- Value = TRUE
- Under Conditions, select All of the conditions are met (AND).
- Click Save.
Define the Action that Occurs when the Process Runs
Next, you need to define the actions that should occur when the process fires - in this case, the custom task weight will be populated.
- On the canvas under Immediate Actions, click on + Add Action.
- For Action Type, select Update Records.
- Enter the Action Name.
- Click into the Record Type field.
- Select the option Select the TASKRAY__Project_Task__c record that started your process.
- Under Criteria for Updating Records, select No criteria - just update the records!
- Under Set new field values for the records you update, select the following:
- Field = Custom Task Weight
- Type = Field Reference
- Value = [TASKRAY__Project_Task__c].Count_of_CLIs__c (if you named your roll-up field something else, use that)
- Click Save.
Activate the Process
That's it! The last thing that you will need to do is activate the process. To do so, click Activate in the top right corner of the page.
You can now test it out in TaskRay!