function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
maheshep.ax379maheshep.ax379 

Relationship Query

I have created a custom object. say MyObject. A field in MyObject is UserDetail which is relationship to the Contact Object. I had given the data type as lookup. now i am able to store  the id but i want to display name. how can do this??? can any one give me a relationship SOQL.
Thanks in Advance
yogesh.rankawatyogesh.rankawat
Hi

In Visualforce page you should use <apex:outputField ...></apex:outputField>,
It will automatically render and display Name.

:smileyhappy: