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
Prasanna_24Prasanna_24 

VF page using Standard List Controller

Hi,

I am writting a simple code to devlelop a VF page using standard list controller and having a doubt.In my code below,i used a SAVE button and Inline Edit command inorder to edit any record and save.Inline edit is working properly where as the edited record is not getting saved as expected.After saving,the record is not getting updated.Can anyone help me out on this.

Your help will be highly useful.

Here is my code.
<apex:page standardController="Account" recordSetVar="Acts">
 <apex:form >
   <apex:pageBlock title="List of Accounts using standard list controller"> 
   
     <apex:pageBlockTable value="{!Acts}" var="a">
         <apex:column value="{!a.name}"/>
         <apex:column value="{!a.industry}"/>
         <apex:column value="{!a.type}"/>
         <apex:column value="{!a.phone}"/>
        
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:commandButton value="Save" action="{!Quicksave}"/>
  <apex:inlineEditSupport />
  
    </apex:form>
</apex:page>
Mahesh DMahesh D
Hi Prasanna,

Please check the below modified code:
 
<apex:page standardController="Account" recordSetVar="Acts">
 <apex:form >
   <apex:pageBlock title="List of Accounts using standard list controller"> 
   
     <apex:pageBlockTable value="{!Acts}" var="a">
         <apex:column>
             <apex:outputField value="{!a.name}">
                <apex:inlineEditSupport event="ondblclick" 
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:outputField>
         </apex:column>
         <apex:column>
             <apex:outputField value="{!a.industry}">
                <apex:inlineEditSupport event="ondblclick" 
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:outputField>
         </apex:column>
         <apex:column>
             <apex:outputField value="{!a.type}">
                <apex:inlineEditSupport event="ondblclick" 
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:outputField>
         </apex:column>
         <apex:column>
             <apex:outputField value="{!a.phone}">
                <apex:inlineEditSupport event="ondblclick" 
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:outputField>
         </apex:column>
        
    </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:commandButton value="Save" action="{!Quicksave}"/>
  <apex:inlineEditSupport />
  
    </apex:form>
</apex:page>

I also tested the above solution in my DE environment and it looks good.

Regards,
Mahesh