Skip to main content

Command Palette

Search for a command to run...

๐Ÿ—๏ธ Day 2 - Building Custom Objects in Salesforce: My Journey & Housing Operations System

Published
โ€ข4 min read
๐Ÿ—๏ธ Day 2 - Building Custom Objects in Salesforce: My Journey & Housing Operations System
C

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 created the foundation of my Housing Operations system by building 4 custom objects:

  1. Property - Managing housing association properties

  2. Tenancy - Tracking tenant agreements

  3. Repair Request - Logging and tracking repairs

  4. Vulnerability - Recording tenant vulnerabilities for safeguarding

Key Learnings

1. Understanding Field Types

I learned when to use each field type:

  • Text - Simple data like names, addresses

  • Number - Quantities like bedrooms, year built

  • Picklist - Controlled values (Property Type, Status)

  • Lookup - Relationships between objects

  • Formula - Automatic calculations (Property Age, SLA dates)

  • Checkbox - Yes/No flags (Active, Vulnerability Flag)

  • Currency - Financial data (Weekly Rent, Arrears)

2. Formula Fields Are Powerful

I created several formula fields that automatically calculate:

Property Age:

YEAR(TODAY()) - Year_Built__c This updates daily without manual intervention!

Target Completion Date (SLA):

CASE(TEXT(Priority__c), "Emergency (24 hours)", Reported_Date__c + 1, "Urgent (3 days)", Reported_Date__c + 3, "Routine (28 days)", Reported_Date__c + 28, "Planned", Reported_Date__c + 90, Reported_Date__c + 28) This automatically sets repair deadlines based on priority!

Days Overdue:

IF(AND(TEXT(Status__c) <> "Completed", TEXT(Status__c) <> "Cancelled"), IF(TODAY() > Target_Completion_Date__c, TODAY() - Target_Completion_Date__c, 0), 0) Tracks SLA breaches automatically.

3. External IDs Prevent Duplicates

I made Property_ID__c an External ID, which:

  • Prevents duplicate properties

  • Enables upsert operations for data imports

  • Acts as a business key

4. Auto Number Fields

Using Auto Number for Tenancy Number and Repair Number means:

  • Salesforce generates unique IDs automatically

  • No manual entry errors

  • Sequential numbering (TEN-0001, REP-00001)

5. Lookup Relationships Connect Data

I created lookups to show:

  • Which property a tenancy is for

  • Which tenant has a repair request

  • Which property needs repair

This creates a connected data model where everything relates!

6. Object Classification Settings Matter!

Important lesson: I had to enable these settings for objects to work properly:

  • โœ… Allow in Chatter Groups

  • โœ… Allow Sharing

  • โœ… Allow Bulk API Access

  • โœ… Allow Streaming API Access

Without these, my objects wouldn't appear in tabs!

7. Creating Tabs and Custom Apps

Custom objects need tabs to appear in the App Launcher. I created:

  • 4 custom tabs (one for each object)

  • A "Housing Operations" custom app

  • Organized navigation for easy access

Screenshots

  1. Property Object with all fields

  2. Property Page Layout

  3. Tenancy Object

  4. Tenancy Page Layout

  5. Repair Request Object

  6. Repair Request Page Layout

  7. Vulnerability Object

  8. Vulnerability Page Layout

  9. Sample Property Record (showing calculated Property Age)

  10. Sample Repair Request (showing SLA formulas working)

Testing Results

I created test data and verified:

โœ… Property Age calculates correctly (40 years for a 1985 property)

โœ… Tenancy Duration calculates from start date

โœ… Repair SLA dates calculate based on priority

โœ… Days Overdue shows correct values

โœ… External ID prevents duplicate properties

โœ… Related lists show connected records

โœ… Custom app navigation works perfectly

Real-World Application

This data model supports real housing association needs:

  • Repairs Team can track SLAs and prioritize vulnerable tenants

  • Housing Officers can see full tenant history (tenancies, repairs, vulnerabilities)

  • Managers can report on overdue repairs and arrears

  • Compliance can audit field history for safeguarding

Challenges I Faced

  1. Formula syntax - Took a few tries to get the CASE statement right for SLA dates

  2. Related lists - Had to remember to add them to BOTH objects (Property AND Contact)

  3. Testing formulas - Had to create records with past dates to test "Days Overdue"

  4. Object Classification settings - Objects weren't visible until I enabled Allow Sharing, Bulk API, and Streaming API!

Tomorrow: Day 3

I'll add validation rules to enforce data quality and prevent bad data from entering the system.

Resources


Follow my journey:

#Salesforce #SalesforceAdmin #LearningInPublic #Day2 #CustomObjects

More from this blog

MrManagwu

22 posts