function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mihir17_inmihir17_in 

how to update record after saving in visualforce page.

<apex:page standardController="RentRequest__c" recordSetVar="rentrequests" tabStyle="RentRequest__c">
<apex:form >
<apex:sectionHeader title="RentRequest" subtitle="{!RentRequest__c.name}"/>
<apex:pageBlock title="RentRequest">
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!Save}"/>
<apex:commandButton value="Cancel" action="{!Cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="New Section" columns="2"><apex:inputField value="{!RentRequest__c.WhichCity__c}"/>
<apex:inputField value="{!RentRequest__c.Date_Required__c}"/>
<apex:inputField value="{!RentRequest__c.Item__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

i get the form but when i click save the page just refreshes.

Rahul SharmaRahul Sharma

mihir17_in,

 

You will need to use custom controller/Standard controller with extension. 

In the controller / extension you need to add custom logic for the save function.