You need to sign in to do that
Don't have an account?
affu
Rendering image
Hi All,
I have a image in Visualforce pdf and i want it to display according to the field selection
I have used the following code but it is not working
<apex:image url="{!$Resource.Image1}" rendered="{!Opportunity.Project_l__c='East Point'}" />
Project_I__c is a lookup field in Opportunity.
when i select this field as East Point it should show the image.
Please help me...
Thanks in advance.
Hi,
Since its a lookup field the Id will be available and not the Name.
Either you need to create a formula field to get the Name from the lookup or use the refrence string like Opportunity.Project_I__r.Name in your rendered condition.
All Answers
can you try as below:
rendered="{!Opportunity.Project_l__c=='East Point'}"
Hi Naresh,
Thanks for replying
Sorry i dint understand the answer because i did the same above can u elaborate please..
Thanku.
Please use double equals to :)
Yes Naresh I have double equalto but it is not working
Can u please check the below condition is correct to display a image in PDF according to the field selection i.e., if Project_I__c=='East Point'.
<apex:image url="{!$Resource.Image1}" rendered="{!Opportunity.Project_l__c=='East Point'}"/>
Hi,
Since its a lookup field the Id will be available and not the Name.
Either you need to create a formula field to get the Name from the lookup or use the refrence string like Opportunity.Project_I__r.Name in your rendered condition.
thanku its working fine