You need to sign in to do that
Don't have an account?
Creation of contact with the help of vf page
Create a VF page with custom controller to search for all accounts on the basis of name.
If we select one of the account and click on create contact then it should be redirected to a new VF Page to create a contact for that account. When I click on save then I should be redirected to the contact detail page.
If we select one of the account and click on create contact then it should be redirected to a new VF Page to create a contact for that account. When I click on save then I should be redirected to the contact detail page.
<apex:page standardController="Account" extensions="accountSearch" > <apex:include pageName="CreateContact"/> <apex:form > <apex:sectionHeader title="User Global Search" subtitle="Result"/> <apex:pageBlock > <apex:pageBlockSection columns="1"> <apex:pageBlockSectionItem > <label>Quick Search</label> <apex:outputPanel > <apex:inputText value="{!searchstring}" label="Input"/> <apex:commandButton value="Search records" action="{!search}" reRender="accPgId" status="ajaxId"/> <apex:commandButton value="create contact" action="{! create}" reRender="ContactPgId" />> <apex:actionStatus startText="Searching..." id="ajaxId"></apex:actionStatus> </apex:outputPanel> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock> <apex:pageBlock title="Search Account Result" id="accPgId" > <apex:pageblockTable value="{!acc}" var="a"> <apex:column headerValue="Name" > <apex:outputlink >{!a.Name}</apex:outputlink> <apex:inputCheckbox value="{! a.Name}"> </apex:inputcheckbox> </apex:column> <apex:column headerValue="Phone" > <apex:outputlink >{!a.Phone}</apex:outputlink> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
1) http://amitsalesforce.blogspot.in/2016/03/wrapper-class-in-salesforce-select-all.html
Let us know if this will help you
According to your code we can fatch account record and activate or deactivate field on account object.
But i want to create contact for selected account .