/
TAP-1304: MS - Add validation rule

Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au

TAP-1304: MS - Add validation rule

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”

 

  • Create a new field (Usyd_VR_Bypass_Toggle__c) as a flag to only allow updating the Stage field via Flow.

 

  • Update the existing logic of the flow to use the toggle field

 

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:

  1. Log in as a GA user

  2. Go to an opportunity with a Gift Implementation record

  3. Open the Gift Implementation record

  4. 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:

  1. Log in as a GA user

  2. Go to an opportunity with a Gift Implementation record

  3. Open the Gift Implementation record

  4. 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)

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

 

Related content

TAP-1303: Update Batch Logic
TAP-1303: Update Batch Logic
More like this
Gift Implementation Unit Testing
Gift Implementation Unit Testing
More like this
TAPSS-845/TAP-902: MS Team - To check the logic and any bad code practice for the list of flows mentioned and merge if required
TAPSS-845/TAP-902: MS Team - To check the logic and any bad code practice for the list of flows mentioned and merge if required
Read with this
TAPSS-240 Opportunity - GIN object, GI Handover stage validation
TAPSS-240 Opportunity - GIN object, GI Handover stage validation
More like this
May R2 Fortnightly TAP Release
May R2 Fortnightly TAP Release
Read with this
TAPSS-220 O2G - making Opportunity components as mandatory as part of the workflow
TAPSS-220 O2G - making Opportunity components as mandatory as part of the workflow
More like this