Archiving finished projects in TaskRay is a great way to reduce clutter in your project sidebar while also maintaining valuable data within those projects for future reporting.
TaskRay comes with a Progress field on the project that calculates using the formula: Completed Tasks / Number of Tasks in the Project. Therefore, this field can be used to indicate when a project is 100% completed. Using the Lightning Process Builder, it is possible to create a process to automatically archive a project when the Progress field equals 100%.
Build the Process Using the Process Builder [Admin]
Create a New Process
- From Setup, navigate to:
- Lightning: Process Automation | Process Builder.
- Classic: Create | Workflow & Approvals | Process Builder.
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 Project object, because that is where the initial action will take place.
- On the canvas, click on + Add Object.
- For the Object field, select TaskRay Project.
- 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 would be reaching 100% completion on the project.
- 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 = Progress
- Operator = Equals
- Type = Number
- Value = 100
Define the Actions that Occur when the Process Runs
Next, you need to define the actions that should occur when the process is fires (project gets archived).
- 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 Select the TASKRAY__Project__c record that started your process. From the exposed dropdown, select TASKRAY_TaskRay_Checklist_Items_r.
- 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 = Archived
- Type = Boolean
- Value = True
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!