The following Article covers how to create a Validation Rule to prevent Project Activities from being Assigned if the Predecessor Activity has not been Completed.
Some companies do not want Project Activities to show on the Calendar or be Assigned to an Installer/Technician if the steps preceding it on the Project have not been Completed. You can setup a Validation Rule to accomplish this.
Go to the Setup menu
Go to the Object Manager and Choose the Project Activity object.
Next click on Validation Rules from the object.
Click the New button on the right side of the screen.
We will name the Validation Rule "Cannot Assign if Pred Step Incomplete"
And use the following Formula:
NOT(ISNEW()) && NOT(ISBLANK( i360core__Assigned_To__c )) && NOT(ISBLANK(i360core__Step_Dependency__c)) && ISBLANK(i360core__Step_Dependency__r.i360core__Completed_On__c)
Be sure to enter an appropriate Error message, such as:
You cannot Assign this Activity until the Step Dependency activity has been Completed. Please complete the Step Dependency activity first, then Assign this Activity.
When finished, Save and Activate the Validation Rule.
Next we will want to test this Validation Rule in our system.
Navigate to the Dispatcher tool
Choose the Date Range and select the Object of Project Activity.
Select a Project Activity record in which the Predecessor Status is not Complete. If you do not see these fields, see also: Add Predecessor Activity Status to the Dispatcher tool.
When we attempt to Assign this Project Activity to an installer, the system gives the Error message from our Validation Rule, telling the User: You cannot Assign this Activity until the Step Dependency activity has been Completed. Please complete the Step Dependency activity first, then Assign this Activity.
Comments
0 comments
Article is closed for comments.