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

Save fields of related list in VF page


I've a custom object named 'Project_Party' and his related list named 'quotes'. I'd like to make an update of the field 'visible' of the related list records from the VFpage. Each time I'm saving nothing happens and the field value comes back to the prior state. Here is my code.

Can anybody help me ?



<apex:page standardController="Project_Party__c" showHeader="false" sidebar="false" standardStylesheets="true">
<apex:form >
     <apex:pageBlock >
        <apex:pageMessages />
        <apex:pageBlockButtons >
          <apex:commandButton value="Save" action="{!quicksave}"/>
        <apex:pageBlockTable value="{!Project_Party__c.quotes__r}" var="quotes__r" >
             <apex:column value="{!}" headerValue="Offertenr" width="30%" />
             <apex:column value="{!quotes__r.PLGROUPQUOTE__c}" headerValue="Productfamilie" width="30%"/>
             <apex:column value="{!quotes__r.quote_amount_manual__c}" headerValue="Bedrag"  width="20%"/>
             <apex:column value="{!quotes__r.Gross_Price__c}" headerValue="Brutoprijs ?" width="13%"/>
             <apex:column headerValue="Zichtbaar ?" width="7%">
             <apex:inputCheckbox value="{!quotes__r.Visible__c}" />


Try using <apex:inputField value="{!quotes__r.Visible__c}" /> instead of inputCheckbox.


Hi Anand,

It's a checkbox but I tried it also with inputField value and it doesn't work.




Generally when you use only standard controllers (without extension), the fields are inputField tag.


In this case however since the record you are trying to save is not of the standard controller type you are using, I am not sure if it will work. Most probably you'll have to use an extension to do your work.