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
Raj88Raj88 

Update a Inputfield using VF page

Hi,
I need to update an inputfield based on the values entered in VF page. I can see the values in my debug logs but those values are not storing in my textbox after saving. This is my code.

Class:
Set<Status__c> setId = new Set<Status__c>();
List<Status__c> OppToUpsert = new List<Status__c>(); 
Opportunity_Gaps_Status__c acc = new Opportunity_Gaps_Status__c();        
for (OppWrapper avar : OppWrappersList)
  {
    if(selectedtext == 'update field')
            {
                    setId.add(avar.acc); 
                    OppToUpsert.addAll(setId); 
            }
    }
upsert OppToUpsert;

VF page:
<apex:repeat value="{!OppList}" var="a">
    <tr>
          <td>{!a.acc.Name__c}</td>
          <td><apex:InputField value="{!a.acc.Updates__c}" id="selectedtext"/></td>
    </tr>       
</apex:repeat>

Can anyone help me. Thanks in advance.
viruSviruS
Try Update instead of Upsert   ... OppToUpsert;

If wants to use upsert ..confim for external id