HouseholdingThe use of Householding of Contacts in Salesforce.com is very handy for some of the needs of nonprofits. Housholding allows: - the communication with a Household, rather than an individual
- the grouping of Contact related data up to the Household when desired
But there are some problems with the way things currently work: - Creating Households on Contact insert requires a custom data entry screen
- Creating Contacts from outside systems and integrations leaves Contacts without a Household
- Keeping address and name data in sync between Contacts and Households is time consuming
- Pulling Household data into reports makes them more complicated than they need be
What We're BuildingWe're building out automated Householding with the following features: - A Household is automatically created when a Contact is inserted into Sf.com
- No Contacts lack Households, ever.
- Households with no members are automatically deleted
- Households are automatically named for their members
- Household names and greetings can be overridden by the User when desired
- All Contacts in the same Household will share a Home address, which will stay in sync between Contacts and Household
Schema- Contact
- Household
- Assumes standard Householding from nonprofit template
- Override Household Name, Text, 255
- Override Greeting, Text, 255
Security- Remove the Household Delete button from Page Layout. Deleting a Household is not handled by the code.
TriggersClassesTeststest notes from code review:test cases covered - new contact (simple)
- new contact w/ last name only
- 2 new contacts w/ same name (should put in diff HH)
- 2 new contacts w/ same HH
- insert one, get HHid, insert 2nd w/ same HHId
- 3 new contacts w/ initially same last name
- chg 1 contact to diff last name
- set override greeting & HH name for HH (test trickle-down to contact)
- then remove overrides (test reverts to default)
- chg contact Home address (test HH address is chgd)
- chg HH address (test trickles down to HH mbrs)
- moving a contact into an existing HH (test names are right)
test not covered - large sets
- chging name (esp. last name) of a contact (should trigger HH name chg unless overridden)
- undelete
- adding a contact w/ no addy to a HH that does have an addy (should adopt HH's addy)
- moving a contact into an existing HH (test addy is inherited)
- moving last contact in a HH into an existing HH (original HH is deleted)
- starting from a 2 person HH, split them up (i.e. null out the HHid field for one of the contacts, test that new hH is created)
NOTE: - test undelete of opps, used to forget which conrole was primary
|