<apex:page standardController="Account"> //use standard controller for save data without controller
<apex:form>
<apex:pageBlock>
<apex:pageBlocksection columns="1">
<apex:inputField value="{!Account.Name}"/> //direct access Accounts’s Name,Phone,AccountNumber by the Standard Controller
<apex:inputField value="{!Account.Phone}"/>
<apex:inputField value="{!Account.AccountNumber}"/>
</apex:pageBlocksection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Create"/> //Save action use for inserting and updating the records in standard controller
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
In the above code using the standardController instead of controller by which directly saves the data in any object which is custom or standard.Only take an action {!save} on any event. If this answers your query please mark this question as a solved so that it can be filtered out from unsolved questions. Regards Akshay
<apex:page standardController="Account"> //use standard controller for save data without controller
<apex:form>
<apex:pageBlock>
<apex:pageBlocksection columns="1">
<apex:inputField value="{!Account.Name}"/> //direct access Accounts’s Name,Phone,AccountNumber by the Standard Controller
<apex:inputField value="{!Account.Phone}"/>
<apex:inputField value="{!Account.AccountNumber}"/>
</apex:pageBlocksection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Create"/> //Save action use for inserting and updating the records in standard controller
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
In the above code using the standardController instead of controller by which directly saves the data in any object which is custom or standard.Only take an action {!save} on any event. If this answers your query please mark this question as a solved so that it can be filtered out from unsolved questions. Regards Akshay
I hope this code will help you.
In the above code using the standardController instead of controller by which directly saves the data in any object which is custom or standard.Only take an action {!save} on any event.
If this answers your query please mark this question as a solved so that it can be filtered out from unsolved questions.
Regards
Akshay
All Answers
Please check with below link...
https://developer.salesforce.com/forums/?id=9060G000000UXjPQAW
https://apexcoder.com/2016/04/13/how-can-we-insert-update-and-delete-a-record-in-a-visualforce-page/
I hope it will be helpful to you.
Please mark it as best answer if the information is informative.
Best Regards,
Srinivas
Let us know if this will help you
I hope this code will help you.
In the above code using the standardController instead of controller by which directly saves the data in any object which is custom or standard.Only take an action {!save} on any event.
If this answers your query please mark this question as a solved so that it can be filtered out from unsolved questions.
Regards
Akshay