You need to sign in to do that
Don't have an account?
Desai
<apex:outputlink>
Hi,
I have built two VF pages. One VF , shows all the appointments and when the subject field is clicked, detial page is opened(2ns VF Pgae).
On this detail page we have link field Who(from events object), which is a lookup field to Contact and Lead.
Now when i click on the link, based on the value it should navigate to contact or lead detail page. How do we do it.
I tired onclick, funciton in class but its not working.
I have built two VF pages. One VF , shows all the appointments and when the subject field is clicked, detial page is opened(2ns VF Pgae).
On this detail page we have link field Who(from events object), which is a lookup field to Contact and Lead.
Now when i click on the link, based on the value it should navigate to contact or lead detail page. How do we do it.
I tired onclick, funciton in class but its not working.
You should point the outputlink to the relative url "/recordid", where recordid is the id of the record you want to open (the value of the field Who). That should open the record you need.
Hope this helps!
Best regards,
Martijn Schwärzer
Ps. If my answer helped you, please mark it as best answer. It will help others find best answer as well.
You can use below code , no need to write onclick method.
OR