Persona + Need + Purpose
As a GA user
...
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”
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” |
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 |