You need to sign in to do that
Don't have an account?
Output field in a VF page, which is a lookup field, has no value
Hi everybody,
I have a master-detail relationship between 2 custom objects (Call_Plan_Line__c and Call_Plan_Line_Result__c). In the header of my page, I display datas from the master object, and particulary the name of the DC Center of the store, which is a lookup field to Account. This field is blank, although I know there is something in it (the Id of the account, I suppose).
Here is my code :
<apex:outputfield value="{!Call_Plan_Line__c.Delivery_DC__c}"/>
Here is the result :
I have tried this too :
<apex:outputfield value="{!Call_Plan_Line__c.Delivery_DC__r.Name}"/>
Here is the result :
Any help will be welcome !
Hi Bob !
I have no problem with the field level security.
But I finally found a solution :
in the class :
in the constitution of the list of Call Plan Result, I added :
, Call_Plan_Line__r.Call_Plan_DC__r.Name
And in the VF Page :
<apex:outputfield value="{!Call_Plan_Line__c.Call_Plan_DC__r.Name}"/>
And now I see what I need to !
I am really a beginner on Sales Force, and it's quiet mysterious for me....
Anyway, thanks a lot for having answered !
Marie
All Answers
Have you checked field level security etc? If you have, try just outputting the raw value from the field to the page, e.g.
Delivery DC field = {!Call_Plan_Line__c.Delivery_DC__c}
If the lookup is populated, the ID of the Account will be displayed.
Hi Bob !
I have no problem with the field level security.
But I finally found a solution :
in the class :
in the constitution of the list of Call Plan Result, I added :
, Call_Plan_Line__r.Call_Plan_DC__r.Name
And in the VF Page :
<apex:outputfield value="{!Call_Plan_Line__c.Call_Plan_DC__r.Name}"/>
And now I see what I need to !
I am really a beginner on Sales Force, and it's quiet mysterious for me....
Anyway, thanks a lot for having answered !
Marie
Would you please be more specific with your solution? Exactly what do you mean by:
in the constitution of the list of Call Plan Result, I added :
Where did you wrote that in the class? Thank you!