Skip to main content The new Salesforce certifications experience is live! Visit Trailhead Academy to explore your new certifications homepage.
I’m enterprise, and I am trying to concatenate two values into one field for output display.

 

  

 

<apex:outputField id="Title" value="{!bc.Title__c}"  />

 

<apex:outputField id="Mentor" value="{!bc.Mentor__c}"  />

 

  

 

I want one apex outputField field to be the value in Title and the value in Mentor. How do I concatenate these two fields in apex coding?
2 answers
Loading
  1. Sep 3, 2017, 5:20 AM
    You need to use  outputtext instead of outputfield .answer for the your question.You can concatenate like this.

     

    <apex:outputtext  value="{!bc.Title__c + '  '+bc.mentor__c }"  />

     

     
0/9000