The ultimate purpose is to create a visualforce page, that will act as a [login to view URL]
page to let Contacts view information about their household, and confirm that it is up to date.
1. Build a visualforce page, that accepts a /003... Contact ID as URL parameter
2. VF Controller does the following:
* Determine the primary account of the contact & render Section 1 (as shown in mockup)
select name, billingaddress from account where id = [login to view URL]
* Determine all related Contacts of that Account & render Section 2 (as shown in mockup)
select name, email, mobilephone, birthday__c from contact where accountid = [login to view URL]
* Render "Are your details correct" message & Yes / No buttons.
* Retrieve latest Household_Verification__c record.
select verified_date__c, verified_by__c from household_verification__c where account__c = [login to view URL] order by verified_date__c desc
Use the first record of the above list to render a subtext under the button : "Last verified on <Date> By <Name>"
3. On click on Yes button, the following must occur:
* Upsert a new record onto Household_Verification__c object using externalID as the lookup key. This prevents additional records being inserted if button clicked twice.
* Navigate to a page with message: Thank you for confirming your details.
4. On click of No button, the following must occur:
* Upsert a new record onto Household_Verification__C object using externalID as lookup key.
* Navigate to a page with message: Please mention the changes required to your household: Long Text Area field.
5. On submit, update Changes__c long text area field the Household_verification__c record
5. Test classes for the controller
- All of the above pages must work on [login to view URL]
- Page must be responsive, render well on a mobile device as well
- Page must get & render data as shown in Mock Upser
- Clicking Yes twice, must not create 2 Household Verification records, but rather update the time stamp alone
- Clicking No, must immediately create a Household Verification record
- Clicking No, must provide user an opportunity to enter free text comments, that will be update on the same Verification record