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
acrozieracrozier 

Inputfield not populating value

I have a very strange situation.  I am using a custom Job object with a custom creation page.  When I input a value into one of my fields (Long Text Area) it shows up on the job page, but when going to edit the value does not repopulate to be edited and must be entered all over again.  What is really strange is that I have other fields of the exact same type setup the exact same way that work.  Any ideas?

 

 

 

<apex:form id="NewJob">
    <apex:pageBlock id="Job" title="Edit Job">
            <apex:pageBlockButtons >   
                     <apex:commandButton value="Save" action="{!JobSaved}" rerender="msgPanel,NewJob"/>
                     <apex:commandButton value="Save & New" action="{!SaveNew}" rerender="msgPanel,NewJob"/>
                     <apex:commandButton value="Cancel" action="{!cancel}" />
            </apex:pageBlockButtons>            
            <apex:pageBlockSection title="Information" columns="2"> 
                <apex:outputField id="name" value="{!Job.name}" />      
                <apex:outputField value="{!Job.Job_Events_Status__c}" />  
                <apex:inputField value="{!Job.Job_Description__c}"/>  
                <apex:inputField value="{!Job.Account__c}" required="true">     
                    <apex:param id="AcctId" value="document.getElementById('{!$Component.mypage:NewJob:Job:j_id5:j_id8_lkid}').value" assignTo="{!AcctId}"/>
                 </apex:inputField>                          
                <apex:inputField value="{!Job.Job_Name_Subject__c}" required="true"/>
                <apex:pageBlockSectionItem id="ContLookup" >
                 <apex:outputLabel >Contact</apex:outputLabel>  
                    <apex:outputPanel >
                    <apex:define name="requiredInputDiv"><div class="requiredInput">
                    <apex:define name="requiredInputDiv"><div class="requiredBlock"/></apex:define>
                    <apex:inputtext id="CName" value="{!ContName}"  size="20" />
                        <apex:commandlink onclick="popup('/apex/LookupContact'); return false;" target="Lookup" immediate="true"  title="Lookup Contact">
                                 <apex:image url="{!$Resource.Lookup}" width="20" height="20"/>
                        </apex:commandlink> 
                    </div></apex:define>
                          <apex:outputPanel id="msgPanel" > 
                            <apex:outputPanel id="msg" rendered="{!If(OR(IsError,IsSaved),true,false)}">
                             <apex:outputtext value="Contact: You must enter a value" style="color:#ff0000;"  />
                        </apex:outputPanel>
                    </apex:outputPanel> 
                   </apex:outputPanel>
                </apex:pageBlockSectionItem> 
                <apex:inputField value="{!Job.Client_Ref__c}"/> 
                <apex:pageBlockSectionItem id="OppLookup">    
                    <apex:outputLabel >Opportunity</apex:outputLabel>
                         <apex:outputPanel >
                        <apex:inputtext Id="theOpp" value="{!OppName}"/>
                            <apex:commandlink onclick="popup('/apex/LookupOpportunity'); return false;" target="Lookup" immediate="true"  title="Lookup Opportunity" >
                                 <apex:image url="{!$Resource.Lookup}" width="20" height="20"/>
                            </apex:commandlink>    
                        </apex:outputPanel> 
                </apex:pageBlockSectionItem>       
                <apex:inputField value="{!Job.Job_Start_Date__c}" required="true"/>
                <apex:inputField value="{!Job.Respondent_Type__c}"/>
                <apex:inputField value="{!Job.Job_End_Date__c}" required="true"/>
                <apex:inputField value="{!Job.Job_Category__c}" />
                <apex:inputField value="{!Job.Other_Date__c}" />
                <apex:inputField value="{!Job.Job_Sub_Category__c}"/>
                <apex:inputField value="{!Job.End_Client__c}"/> 
                <apex:inputField value="{!Job.Job_Status__c}" Id="JobStatus" required="true">
                    <script>document.getElementById('{!$Component.JobStatus}').disabled = {!IF(Status,true,false)}; </script>
                </apex:inputField>  
                <apex:inputField value="{!Job.Other_Location__c}" Id="JobLoc" required="true">
                    <script>document.getElementById('{!$Component.JobLoc}').disabled = {!IF(Status,true,false)}; </script>
                </apex:inputField>  
                <apex:inputField value="{!Job.Job_Qualification__c}" required="true"/>
                <apex:inputField value="{!Job.Moderator_Name__c}"/>
                <apex:inputField value="{!Job.Job_Type__c}" required="true"/>
                <apex:inputField value="{!Job.PM__c}" required="true" />
                <apex:inputField value="{!Job.Recruitment_Method__c}" required="true"/>
                <apex:inputField value="{!Job.Booked_By__c}" required="true"/>
                <apex:inputField value="{!Job.Required_Number_of_Participants__c}" required="true" />
                <apex:pageBlockSectionItem />  
                <apex:pageBlockSectionItem />   
                <apex:inputField value="{!Job.Exclude_from_Calendar__c}" />  
                <apex:pageBlockSectionItem />      
                <apex:inputField value="{!Job.TDI_Job__c}" />
                <apex:pageBlockSectionItem /> 
                <apex:inputField value="{!Job.GMS_Job__c}" />
                <apex:inputHidden id="ContName" value="{!Job.Contact__c}"/>
                <apex:inputHidden id="Oppty" value="{!Job.Opportunity__c}"/>         
            </apex:pageBlockSection>             
            <apex:pageBlockSection title="Additional Information" columns="2"> 
            <apex:inputField value="{!Job.Actual_Number_of_Participants__c}" />
            <apex:inputField value="{!Job.Project_Received_Date__c}" />
            <apex:inputField value="{!Job.Recruit_Start_Date__c}" />
            <apex:inputField value="{!Job.Incentive_Amounts__c}" />
            <apex:inputField value="{!Job.Referral_Fee__c}" />
            <apex:inputField value="{!Job.Basic_Specs__c}" />  
            <apex:inputField value="{!Job.Facility_Special_Requirement__c}" />
            <apex:inputField value="{!Job.Basic_Specification__c}" />   
            <apex:inputField value="{!Job.Invoice_Number__c}" />            
            <apex:inputField value="{!Job.Additional_Notes__c}" />       
                        
            </apex:pageBlockSection> 
            
            <apex:pageBlockSection title="Ratings" columns="2"> 
            <apex:inputField value="{!Job.Recruitment__c}" />
            <apex:inputField value="{!Job.Project_Management__c}" />
            <apex:inputField value="{!Job.Facility_Staff_Service__c}" />
            <apex:inputField value="{!Job.Facility_Rating__c}" />
            <apex:inputField value="{!Job.Rating_Comments__c}" />
                        
            </apex:pageBlockSection> 
            
            <apex:pageBlockSection title="Comments" columns="1"> 
             <apex:inputField value="{!Job.PO_Number__c}" />
            <apex:inputField value="{!Job.Special_Needs__c}" style="width:90%" />          
            <apex:inputField value="{!Job.Comments__c}" style="width:90%" />
            <apex:inputField value="{!Job.Client_Service_Manager_Notes__c}" style="width:90%" />
            <apex:inputField value="{!Job.QA_Feedback__c}" style="width:90%" /> 
                        
            </apex:pageBlockSection> 
             
    </apex:pageBlock>
</apex:form>

 



 

 

Best Answer chosen by Admin (Salesforce Developers) 
MiddhaMiddha
  • Seems like you are using some class/wrapper, can you paste the code.

All Answers

MiddhaMiddha
  • Seems like you are using some class/wrapper, can you paste the code.
This was selected as the best answer
acrozieracrozier

Didn't realize I had to tell the Visualforce page to pull back the value in my Select statement.  Figured this out now, thanks.