You need to sign in to do that
Don't have an account?
khushbu dubey
i have written code for standard controller ..is it correct??
<apex:page standardController="Account"> <apex:pageBlock > <apex:pageBlockSection title="Account information"> <apex:outputField value="{!Account.Name}"/> <apex:outputField value="{!Account.Type}"/> <apex:outputField value="{!Account.Industry}"/> <apex:outputField value="{!Account.Phone}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>
Remember, for this page to display account data, the ID of a valid account record must be specified as a query parameter in the URL for the page. For example:
https://Salesforce_instance/apex/myPage?id=001x000xxx3Jsxb
But if you want to get the value and save it then try below code PLease check below post for more information
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std_actions.htm
https://developer.salesforce.com/page/Building_Visualforce_Pages_Using_the_Standard_Controller
Let us know if this will help you
All Answers
The above code is correct and when you are executing it, use the below URL
https://c.na2.visual.force.com/apex/AccStdController?Id=0014000000HJXxF
Here you have to change your Server name and take any account id from your environment.
Please do let me know if it helps you.
Regards,
Mahesh
Remember, for this page to display account data, the ID of a valid account record must be specified as a query parameter in the URL for the page. For example:
https://Salesforce_instance/apex/myPage?id=001x000xxx3Jsxb
But if you want to get the value and save it then try below code PLease check below post for more information
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std_actions.htm
https://developer.salesforce.com/page/Building_Visualforce_Pages_Using_the_Standard_Controller
Let us know if this will help you