1

I am trying to enable inline editing for a visual force page I created. However, whenever I try to save it I get the following error, "Error: Inline Editing is supported for API Version 21 and above." How do I upgrade the API version???

Here is my code

<apex:page standardController="Contact">
<apex:sectionHeader title="{!$ObjectType.Contact.label}" subtitle="{!Contact.name}"/>
<apex:pageBlock mode="InlineEdit" title="{!$ObjectType.Contact.label} Detail">
    <apex:pageBlockSection showHeader="true" title="Address Information" columns="2">
        <apex:outputField value="{!Contact.MailingStreet}"/>
        <apex:outputField value="{!Contact.OtherStreet}"/>
        <apex:outputField value="{!Contact.MailingCity}"/>
        <apex:outputField value="{!Contact.OtherCity}"/>
        <apex:outputField value="{!Contact.MailingState}"/>
        <apex:outputField value="{!Contact.OtherState}"/>
        <apex:outputField value="{!Contact.MailingPostalCode}"/>
        <apex:outputField value="{!Contact.OtherPostalCode}"/>
        <apex:outputField value="{!Contact.MailingCountry}"/>
        <apex:outputField value="{!Contact.OtherCountry}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Contact Preferences" columns="2">
        <apex:outputField value="{!Contact.Best_way_to_contact__c}"/>
        <apex:outputField value="{!Contact.Textable__c}"/>
        <apex:outputField value="{!Contact.Access_to_Internet__c}"/>
        <apex:outputField value="{!Contact.Do_Not_Call__c}"/>
        <apex:outputField value="{!Contact.Access_to_Computer__c}"/>
        <apex:outputField value="{!Contact.Email_Opt_Out__c}"/>
        <apex:outputField value="{!Contact.Do_Not_Assign_Coach__c}"/>
        <apex:outputField value="{!Contact.Do_Not_Track__c}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Demographics" columns="2">
        <apex:outputField value="{!Contact.Gender__c}"/>
        <apex:outputField value="{!Contact.Ethnicity__c}"/>
        <apex:outputField value="{!Contact.Birthdate}"/>
        <apex:outputField value="{!Contact.Race__c}"/>
        <apex:outputField value="{!Contact.Qualify_for_free_reduced_lunch__c}"/>
        <apex:outputField value="{!Contact.Asian__c}"/>
        <apex:outputField value="{!Contact.English_is_first_language__c}"/>
        <apex:outputField value="{!Contact.First_Generation__c}"/>
        <apex:outputField value="{!Contact.Individualized_Education_Program__c}"/>
        <apex:outputField value="{!Contact.Educational_Opp_Program_Participant__c}"/>
        <apex:outputField value="{!Contact.Residency__c}"/>
        <apex:outputField value="{!Contact.Military_Status__c}"/>
        <apex:outputField value="{!Contact.Social_Services__c}"/>
        <apex:pageBlockSectionItem />
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Emergency Contact Information" columns="2">
        <apex:outputField value="{!Contact.Emergency_Contact_Name__c}"/>
        <apex:outputField value="{!Contact.Emergency_Contact_Phone__c}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Family Information" columns="2">
        <apex:outputField value="{!Contact.Parent_Guardian_1_Name__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Name__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Relationship__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Relationship__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Education_Level__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Education_Level__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Email__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Email__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Mobile__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Mobile__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Textable__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Textable__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Other_Phone__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Other_Phone__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_1_Work_Phone__c}"/>
        <apex:outputField value="{!Contact.Parent_Guardian_2_Work_Phone__c}"/>
        <apex:outputField value="{!Contact.Permanently_Reside_With__c}"/>
        <apex:outputField value="{!Contact.of_Residents_in_Household__c}"/>
        <apex:outputField value="{!Contact.Dependency__c}"/>
        <apex:pageBlockSectionItem />
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Spouse and Children Information" columns="2">
        <apex:outputField value="{!Contact.Name_of_spouse_partner__c}"/>
        <apex:pageBlockSectionItem />
        <apex:outputField value="{!Contact.Name_of_child_1__c}"/>
        <apex:outputField value="{!Contact.Age_of_child_1__c}"/>
        <apex:outputField value="{!Contact.Name_of_child_2__c}"/>
        <apex:outputField value="{!Contact.Age_of_child_2__c}"/>
        <apex:outputField value="{!Contact.Name_of_child_3__c}"/>
        <apex:outputField value="{!Contact.Age_of_child_3__c}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="Sibling Information" columns="2">
        <apex:outputField value="{!Contact.Sibling_1_Name__c}"/>
        <apex:outputField value="{!Contact.Sibling_1_High_School_Graduated_From__c}"/>
        <apex:outputField value="{!Contact.Sibling_1_High_School_Graduation_Year__c}"/>
        <apex:outputField value="{!Contact.Sibling_1_College_Graduated_From__c}"/>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="true" title="System Information" columns="2">
        <apex:outputField value="{!Contact.CreatedById}"/>
        <apex:outputField value="{!Contact.Record_Completeness__c}"/>
        <apex:outputField value="{!Contact.AccountId}"/>
        <apex:outputField value="{!Contact.LastModifiedById}"/>
        <apex:outputField value="{!Contact.Name}"/>
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Student Record Type"/>
            <apex:outputPanel >
                <apex:outputText value="{!Contact.RecordType.Name}"/>&nbsp;
                <apex:outputLink value="/setup/ui/recordtypeselect.jsp?id={!LEFT(Contact.id,15)}&amp;retURL=%2F{!LEFT(Contact.id,15)}">[Change]</apex:outputLink>
            </apex:outputPanel>
        </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
    <apex:pageBlockSection showHeader="false" title="Custom Links" columns="3">
    </apex:pageBlockSection>
</apex:pageBlock>

enter image description here

3

Click on the Version Settings tab and give the page an API version of 21 or above (since you are using just a standard controller I suggest you to keep a recent API version, like 37), save and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.