You need to sign in to do that
Don't have an account?
acrozier
Make the text of a field display instead of the ID
<apex:outputtext style="font-size:15px" value="for {!Quote.Opportunity.End_Client__c}"/>
This code pulls the End_Client ID instead of the name, how can I change that?
Try this :
<apex:outputtext style="font-size:15px" value="for {!Quote.Opportunity.End_Client__r.Name}"/>
Thanks
Ankit Arora
Blog | Facebook | Blog Page
All Answers
Try this :
<apex:outputtext style="font-size:15px" value="for {!Quote.Opportunity.End_Client__r.Name}"/>
Thanks
Ankit Arora
Blog | Facebook | Blog Page
As this End_Client__c is a reference field it will always come as ID, to show the name you can use a Map like this
In controller :
public MAP<ID , String> mapEndClient = new MAP<ID , String>();
//Fill map like this
mapEndClient .put(Quote.Opportunity.End_Client__c , Quote.Opportunity.End_Client__r.Name);
//In VFP
<apex:outputtext style="font-size:15px" value="{!mapEndClient [Quote.Opportunity.End_Client__c]}"/>
let me know if any issue in it.
its actually a lookup. realized I just need to use End_Client__r.name
Indeed!! Suggested you the same :)
Thanks
Ankit Arora
Blog | Facebook | Blog Page
In my webservice programm im getting ID of the master-detail record instead of record value.Below is my sample WS Programm and tested in workbench. Please, give me suggestions.
JFYI.... I have tested in WorkBench.
@restresource(urlMapping='/showJobpostingsRecords/*')
global class getJobposts
{
@HttpGet
global static List<Job_Posting__c> selectRecords()
{
List<Job_Posting__c> jp=[select Position_Name__c,Employment_Website__c,Name from Job_Posting__c where Name = 'JP-0002'];
return(jp);
}
}