You need to sign in to do that
Don't have an account?
Anoop Kumar 31
I want to create a visual force page where I have account name and industry with one Button ="Save". If I click on Save button after selecting Account name and Industry then it should show all related contacts to that account.
<apex:page standardController="Account" >
<apex:form >
<apex:pageBlock title="Show Attached Contacts">
<apex:pageBlockSection title="Files" >
<apex:inputField value="{!Account.Name}" />
<apex:inputField value="{!Account.Industry}"/> </apex:pageBlockSection>
<apex:pageBlockButtons location="Bottom">
<apex:commandButton value="Click Me!" />
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:form >
<apex:pageBlock title="Show Attached Contacts">
<apex:pageBlockSection title="Files" >
<apex:inputField value="{!Account.Name}" />
<apex:inputField value="{!Account.Industry}"/> </apex:pageBlockSection>
<apex:pageBlockButtons location="Bottom">
<apex:commandButton value="Click Me!" />
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Here is a solution to your Problem.
----VF_Page----------
-------VF_Controller--------
I hope it will help you.
Please select this as Best Answer so that other's also get help from this.
Thanks,
Akshay