Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- insert hoh;
- insert acc;
- primarycontact.accountId = acc.id;
- upsert primarycontact;
- othercontact.accountId = acc.id;
- othercontact.Contact1__c = primarycontact.Id;
- insert othercontact;
- for(contact cc : ContactList){
- cc.accountId = acc.id;
- cc.Contact1__c = primarycontact.Id;
- }
- upsert ContactList;
- }
- }
- <apex:pageBlocksection title="Demographic Data: (All information is confidential and is used in applying for grants to fund this program.)" columns="3">
- <apex:inputField value="{!primarycontact.Spanish_translation_Services_Needed__c}"/>
- <apex:inputField value="{!primarycontact.Race_Check_One__c}"/>
- <apex:inputField value="{!primarycontact.Marital_Status_check_one__c}"/>
- <apex:inputField value="{!primarycontact.HIGHEST_LEVEL_OF_EDUCATION_Check_one__c}"/>
- <apex:inputField value="{!primarycontact.Employment_check_one__c}"/>
- </apex:pageBlocksection>
- <apex:pageBlocksection title="Income:" columns="3">
- <apex:inputField value="{!primarycontact.Annual_Income__c}"/>
- <apex:inputField value="{!primarycontact.Source_of_Income__c}"/>
- <apex:inputField value="{!primarycontact.Primary_Method_of_Transportation__c}"/>
- </apex:pageBlocksection>
- <apex:pageBlocksection title="HOUSEHOLD Information:" columns="3">
- <apex:inputField value="{!othercontact.Other_Adult_First_Name__c}"/>
- <apex:inputField value="{!othercontact.LastName}"/>
- <apex:inputField value="{!othercontact.Date_of_Birth__c}"/>
- <apex:inputField value="{!othercontact.Gender__c}"/>
- <apex:inputField value="{!othercontact.Relationship_Primary_Care_Provider__c}"/>
- <apex:inputField value="{!othercontact.Medical_Insurance__c }"/>
- </apex:pageBlocksection>
- <apex:pageBlocksection title="Children (all children currently in your household, INCLUDING those participating in this program):" columns="1" />
- <apex:variable var="rowNum" value="{!0}"/>
- <!--<apex:pageBlock id="membAdd"/> -->
- <apex:variable var="rowNum" value="{!0}"/>
- <apex:pageblockSection id="pbs1">
- <apex:pageBlockTable value="{!ContactList}" var="c">
- <apex:column headerValue="Number" style="width:20px; text-align:center;" headerClass="centertext">
- <apex:outputText value="{0,number, ###}" style="text-align:center;">
- <apex:param value="{!rowNum+1}"/>
- </apex:outputText>
- </apex:column>
- <apex:column headerValue="Name">
- <apex:inputfield value="{!c.lastName}"/>
- </apex:column>
- <apex:column headerValue="Delete">
- <apex:commandLink style="font-size:15px; font-weight:bold; text-align:center;color:red;" value="X" action="{!delRow}" reRender="pbs1" rendered="{!rowNum>0}">
- <apex:param value="{!rowNum}" name="index"/>
- </apex:commandLink>
- <apex:variable var="rowNum" value="{!rowNum+1}"/>
- </apex:column>
- <apex:column headerValue="AddRow">
- <apex:commandButton value="Add Row" action="{!addRow}"/>
- </apex:column>
- </apex:pageBlockTable>
- </apex:pageblockSection>
- <apex:commandButton value="Save" action="{!save}"/>
- </apex:pageBlock>
Add Comment
Please, Sign In to add comment