0

I have below VF page that is look alike of standrad detail page. Now I need to change field labels in the vf page. Can someone suggest a wayout please?

Code:

<apex:page standardController="Account_Plan_vod__c" standardStylesheets="true">  
    <apex:pageBlock title="Kol Plan"/>

    <apex:dataTable value="{!Account_Plan_vod__c}"
                var="AP"
                cellPadding="4" border="1"> 

    <apex:column value="{!AP.Name}"/>
    </apex:dataTable>
    <apex:detail subject="{!Account_Plan_vod__c.Id}"  relatedList="true" title="false">


    </apex:detail>


      </apex:page>
1

If you want to change button label at Object level then for Standard Object go to

Customize> Tab Names and Labels > Rename Tabs and Labels > Select Object > edit > Change the name

For custom Object you can directly change the name.

7
  • I need to change Custom Field labels only in this VF Page. – Testing_SFDC Oct 7 '15 at 6:53
  • then you need to create custom page using apex:inputField and then you can change the label – Tushar Sharma Oct 7 '15 at 6:56
  • Can I not change those field labels here in apex: detail somehow? Is it impossible? – Testing_SFDC Oct 7 '15 at 6:59
  • You need to apply Javascript hacks – Tushar Sharma Oct 7 '15 at 7:01
  • 1
    you need to find their class name or Id And using Javascript Will change their text document.getElementsByClassName('labelCol')[0].innerText ='test label'; but it is not recommend approach and i suggest you to go with apex:outputField approach. It will take less time and futureProof – Tushar Sharma Oct 7 '15 at 12:27

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.