You need to sign in to do that
Don't have an account?
azhar khasim
<apex:page standardController="Account" >
<apex:form>
<apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="cancel"/>
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:outputlabel value="First Name"/>
<apex:outputpanel>
<apex:inputText value="{!salutation}" id="personSalutation"/>
<apex:inputText value="{!fname}" id="personFname"/>
</apex:outputpanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:outputLabel value="Last Name" for="personLname"></apex:outputLabel>
<apex:inputText value="{!lname}" id="personLname"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
this is my code which i was unable to do.
My Error: Unknown property 'AccountStandardController.salutation'
Record type need to be inserted in Visualforce page i have inserted it but getting so many errors
<apex:page standardController="Account" >
<apex:form>
<apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!cancel}" value="cancel"/>
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:outputlabel value="First Name"/>
<apex:outputpanel>
<apex:inputText value="{!salutation}" id="personSalutation"/>
<apex:inputText value="{!fname}" id="personFname"/>
</apex:outputpanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:outputLabel value="Last Name" for="personLname"></apex:outputLabel>
<apex:inputText value="{!lname}" id="personLname"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
this is my code which i was unable to do.
My Error: Unknown property 'AccountStandardController.salutation'
Try to use {!account.salution} instead of {!salutation} in all expressions.
Regards,
MKR
While I have got some other error like
'Invalid field fname(firstName)for SObject Account'
In the Account Object, we have another one like Person Account
Actually, We have Salutation, firstName,lastName is in Person Account which has separate Record Type
So we need to get those data in it.
Greetings to you!
Below is the sample code. Kindly modify the code as per your requirement.
If you want to create person account using custom controller then use below code.
Visualforce:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Try {!account.PersonSalutation}.
Regards,
MKR