๐ Day 3: Data Quality & Validation Rules

I am a senior software developer with extensive experience in leading teams and building complex web platforms, including educational and healthcare-focused applications. I have demonstrated deep technical expertise in backend development, AI integration, and cloud technologies, which is further evidenced by my peer-reviewed publications in real-time object detection and AI. My work has earned recognition through citations and contributions to platforms indexed in Google Scholar and ResearchGate. Beyond my technical roles, I am actively involved in mentorship through ADPList and serve as an Alumni Advisory Board Member for the Generation Initiative, showcasing my commitment to advancing digital skills and cloud technology.
What I Built Today
Today I focused on data quality by implementing 6 validation rules across my Housing Operations system. These rules act as gatekeepers, preventing bad data from entering Salesforce.
The 6 Validation Rules:
Tenancy End Date Logic โ End date cannot be before start date
Repair Completion Date Logic โ Completion date cannot be before reported date
Repair Status Completion โ If status is "Completed", completion date must be filled
Vulnerability Review Date Logic โ Review date cannot be before identified date
Property Year Built Logic โ Year built cannot be in the future
Rent Arrears Logic โ Rent arrears cannot be negative
Key Learnings
1. What Are Validation Rules?
Validation rules are formulas that evaluate to TRUE or FALSE:
If TRUE โ Error fires, record doesn't save
If FALSE โ Record saves successfully
They're essential for:
Data integrity โ Preventing illogical data
Compliance โ Ensuring required fields are filled
User guidance โ Clear error messages help users fix mistakes
2. Formula Functions I Mastered
AND() โ All conditions must be true
AND(NOT(ISBLANK(End_Date__c)), End_Date__c < Start_Date__c)
Only check end date if it's filled AND it's before start date.
ISBLANK() โ Check if field is empty
ISBLANK(Actual_Completion_Date__c)
Returns TRUE if completion date is blank.
ISPICKVAL() โ Check picklist value
ISPICKVAL(Status__c, "Completed")
Returns TRUE if status equals "Completed".
YEAR(TODAY()) โ Get current year
Year_Built__c > YEAR(TODAY())
Checks if year built is in the future.
3. The 6 Validation Rules Explained
Rule 1: Tenancy End Date Logic
Object: HOA_Tenancy__c
Formula:
AND(NOT(ISBLANK(End_Date__c)), End_Date__c < Start_Date__c)
Why it matters:
Prevents illogical tenancy durations
Ensures accurate reporting on tenancy lengths
Critical for rent calculation and arrears tracking
Error Message: "End Date cannot be before Start Date."
Rule 2: Repair Completion Date Logic
Object: HOA_Repair_Request__c
Formula:
AND(NOT(ISBLANK(Actual_Completion_Date__c)), Actual_Completion_Date__c < Reported_Date__c)
Why it matters:
Ensures accurate SLA tracking
Prevents time-travel data entry errors
Essential for performance reporting to board
Error Message: "Actual Completion Date cannot be before Reported Date."
Rule 3: Completed Status Requires Date
Object: HOA_Repair_Request__c
Formula:
AND(ISPICKVAL(Status__c, "Completed"), ISBLANK(Actual_Completion_Date__c))
Why it matters:
Prevents marking repairs as complete without recording when
Ensures complete data for SLA reporting
Critical for contractor performance tracking
Error Message: "You must enter an Actual Completion Date when Status is Completed."
Rule 4: Vulnerability Review Date Logic
Object: HOA_Vulnerability__c
Formula:
AND(NOT(ISBLANK(Review_Date__c)), Review_Date__c < Identified_Date__c)
Why it matters:
Maintains audit trail for safeguarding compliance
Ensures reviews happen in logical sequence
Critical for regulatory inspections
Error Message: "Review Date cannot be before Identified Date."
Rule 5: Property Year Built Logic
Object: HOA_Property__c
Formula:
Year_Built__c > YEAR(TODAY())
Why it matters:
Prevents data entry errors
Ensures property age calculations are accurate
Important for maintenance planning (older properties need more repairs)
Error Message: "Year Built cannot be in the future."
Rule 6: Rent Arrears Logic
Object: HOA_Tenancy__c
Formula:
Rent_Arrears__c < 0
Why it matters:
Prevents financial data errors
Ensures accurate arrears reporting
Protects financial integrity of the system
Error Message: "Rent Arrears cannot be negative. If tenant has overpaid, please contact Finance team."
4. Testing Is Critical!
I tested each validation rule with:
Invalid data โ Confirmed error messages appear
Valid data โ Confirmed records save successfully
Edge cases โ Blank values, boundary conditions
Example Test: Tenancy End Date Validation
Test Scenario: Create a tenancy with end date before start date.
Steps:
Go to Housing Operations app โ Tenancies
Click New
Fill in:
Start Date: 01/01/2024
End Date: 01/12/2023 (before start!)
Click Save
Result: โ Error appeared: "End Date cannot be before Start Date."
Test Scenario 2: Create tenancy with blank end date (should work).
Result: โ Record saved successfully (blank end date is allowed for active tenancies)
Example Test: Completed Status Requires Date
Test Scenario: Mark repair as "Completed" without filling completion date.
Steps:
Go to Housing Operations app โ Repair Requests
Click New
Fill in:
Reported Date: Today
Issue Description: "Leaking tap"
Status: Completed
Actual Completion Date: Leave blank
Click Save
Result: โ Error appeared: "You must enter an Actual Completion Date when Status is Completed."
Screenshots




Validation Rules List for Tenancy โ Setup โ Object Manager โ Tenancy โ Validation Rules (showing both rules)
End Date Validation Rule Setup โ The full configuration page for End_Date_Before_Start_Date
Validation Rules List for Repair Request โ Showing both repair-related rules
Completed Status Validation Rule Setup โ The full configuration for Completed_Status_Requires_Date
Vulnerability Validation Rule Setup โ The full configuration for Review_Date_Before_Identified_Date
Property Validation Rule Setup โ The full configuration for Year_Built_In_Future
Error Message in Action โ Screenshot of validation rule firing (showing the error message on screen)
All Validation Rules Summary โ A document showing all 6 rules created
Challenges I Faced
1. Formula Syntax
Getting AND() and NOT() nested correctly took a few tries. I learned that:
Parentheses must be balanced
Each function needs its arguments in the right order
NOT(ISBLANK()) is different from ISBLANK() = FALSE
2. ISPICKVAL vs TEXT
Learned that ISPICKVAL() is the correct function for picklists, not TEXT(). Using TEXT(Status__c) = "Completed" would work but ISPICKVAL() is best practice.
3. Testing Edge Cases
Had to think through scenarios like:
What if end date is blank? (should be allowed for active tenancies)
What if both dates are the same? (should be allowed)
What if user changes status from Completed to In Progress? (completion date can remain filled)
4. Error Message Clarity
Wrote user-friendly messages that explain HOW to fix the error, not just what's wrong.
Bad: "Invalid date." Good: "End Date cannot be before Start Date." Better: "Rent Arrears cannot be negative. If tenant has overpaid, please contact Finance team." (provides next steps)
Real-World Impact for Incommunities
These 6 validation rules will:
Data Quality
Reduce data entry errors by 80%+ (based on industry benchmarks)
Improve reporting accuracy โ No more illogical dates breaking reports
Prevent financial errors โ Negative arrears can't be entered
Compliance
Ensure audit trails โ Safeguarding reviews have logical sequence
Meet regulatory requirements โ Data integrity for inspections
Support legal cases โ Accurate tenancy dates for disputes
Operational Efficiency
Save time โ Staff won't have to manually check for data errors
Reduce support tickets โ Clear error messages guide users
Enable automation โ Clean data allows for reliable automated processes
Trust & Confidence
Build trust โ Managers can trust the data in the system
Improve decision-making โ Reports based on accurate data
Professional image โ System enforces business rules consistently
What I Learned About the Salesforce Admin Role
Today's work directly aligns with the Salesforce Administrator role at Incommunities:
From the Job Spec:
"Ensure data quality and integrity across the Salesforce platform"
How validation rules deliver this:
Prevent bad data at the point of entry
Enforce business rules consistently
Maintain data standards across all users
From the Job Spec:
"Configure Salesforce to meet business requirements"
How validation rules deliver this:
Translate business rules into technical configuration
Balance data quality with user experience
Document rules for future reference
From the Job Spec:
"Support users and resolve issues"
How validation rules deliver this:
Clear error messages reduce support tickets
Prevent issues before they happen
Guide users to correct data entry
Tomorrow: Day 4
I'll dive into Formula Fields โ creating calculated fields that automatically compute values based on other fields. This will include:
Text formulas
Number formulas
Date formulas
Conditional logic (IF statements)
Looking forward to making the system even smarter! ๐ง
Resources
GitHub: [https://github.com/chidoziemanagwu/sfdc-housing-ops-admin-ba]
Hashnode: [](https://github.com/chidoziemanagwu/sfdc-housing-ops-admin-ba)https://doxzy.hashnode.dev/series/project-based-learning-with-daily-lessons-templates-and-assets[]
Progress Tracker
โ Day 2: Custom Objects & Fields
โ Day 3: Data Quality & Validation Rules
โฌ Day 4: Formula Fields
โฌ Day 5: Security & Access
โฌ Day 6: Automation (Flow)
โฌ Day 7: Reports & Dashboards
โฌ Day 8: Data Management
โฌ Day 9: Integration Basics
โฌ Day 10: Final Project & Review
Follow my journey:
GitHub: [https://github.com/chidoziemanagwu/sfdc-housing-ops-admin-ba]
Hashnode: [https://doxzy.hashnode.dev/series/project-based-learning-with-daily-lessons-templates-and-assets]
#Salesforce #SalesforceAdmin #LearningInPublic #Day3 #DataQuality #ValidationRules #HousingAssociation #Incommunities



