Persona + Need + Purpose
As a GA user
I want to ensure that all stages of the flow are done in order
So that business process is followed.
GA-Entry, GA-Approval, GI-Kickoff -
Acceptance Criteria
GI Kick off stage → If gift/pledge doesn’t exist at GIN level and stage updated to GI-Kickoff throw an error
Error message : “Please check that the gift pledge exists and credited opportunity updated at Gift level”
Make the Gift/Pledge record read only at page layout level so that only flow will update the field and set stage
GA entry and GA approval cannot be updated manually but should be updated by flow
Error message: “This stage is updated automatically and cannot be set manually. Please contact Gift Administration for more information”
Implementation
Create 2 new Validation Rules on Gift Implementation Object:
Validation Rule Name | Logic | Condition Formula | Error Message |
Usyd_Require_GiftPledge_Kick_Off_Stage | Check if the Stage is Updated to “5. GI - Kick Off” and if the Gift/Pledge field is empty and throw the error message below: | ISCHANGED(AQC_Stage__c) && ISPICKVAL(AQC_Stage__c, '5. GI - Kick Off') && ISBLANK(AQC_GiftPledge__c) | “Please check that the gift pledge exists and credited opportunity updated at Gift level” |
Usyd_Disable_Users_To_Update_Gift_Stage | Fire only the error message below once the User is manually updating the Stage to “3. GA-Entry” or “4. GA-Approval”
| NOT(ISCHANGED(Usyd_VR_Bypass_Toggle__c)) && (ISCHANGED(AQC_Stage__c ) && (ISPICKVAL( AQC_Stage__c , '3. GA-Entry') || ISPICKVAL( AQC_Stage__c , '4. GA-Approval'))) | “This stage is updated automatically and cannot be set manually. Please contact Gift Administration for more information” |
Update Gift Implementation Layout to set the Gift/Pledge field to read-only
Unit Testing
#1 Update Gift Implementation Stage to GA - Kick Off when Gift/Pledge is blank
Steps:
Log in as a GA user
Go to an opportunity with a Gift Implementation record
Open the Gift Implementation record
Update manually the Stage to “GA - Kick Off“ without a Gift/Pledge linked to it.
Expected Result: Validation Rule should fire with error message “Please check that the gift pledge exists and credited opportunity updated at Gift level“
Actual Result: Error message thrown “Please check that the gift pledge exists and credited opportunity updated at Gift level“
#2 Update Gift Implementation Stage manually to GA - Entry or GA - Approval
Steps:
Log in as a GA user
Go to an opportunity with a Gift Implementation record
Open the Gift Implementation record
Update manually the Stage to “GA - Entry“ or “GA - Approval“.
Note: These stages can only be updated thru Flow from (Batch Item flow trigger)
Expected Result: Validation Rule should fire with error message “This stage is updated automatically and cannot be set manually. Please contact Gift Administration for more information“
Actual Result: Error message thrown “This stage is updated automatically and cannot be set manually. Please contact Gift Administration for more information“
Components
Component Name | API Name | Type | Parent Object | Operation (New/Update) |
---|---|---|---|---|
Usyd_Require_GiftPledge_Kick_Off_Stage | Usyd_Require_GiftPledge_Kick_Off_Stage | Validation Rule | AQC_GiftImplementation__c | New |
Usyd_Disable_Users_To_Update_Gift_Stage | Usyd_Disable_Users_To_Update_Gift_Stage | Validation Rule | AQC_GiftImplementation__c | New |
Usyd VR Bypass Toggle | Usyd_VR_Bypass_Toggle__c | Custom Field | AQC_GiftImplementation__c | New |
Gift Implementation Layout | Gift_Implementation_Layout | Page Layout | AQC_GiftImplementation__c | Update |
System Administrator | Profile | N/A | Update | |
Read Only | Profile | N/A | Update | |
AQC Opportunity to Gift | AQC_Opportunity_to_Gift | Permission Set | N/A | Update |