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
Jagadeesh24Jagadeesh24 

How to get the custom object custom field values using vlookup

How to get the custom object custom field values using vlookup.
Here is my requirement.
Assume 2 custom objects namely QTPStatus and QTPPosition
QTPPosition object has Position Name as custom field. When QTPPosition object is created, a standard field named 'QTPPositionName' created automatically.

Now i will create field with vlookup datatype on QTPStatus object relating to 'QTPPosition' object to fetch the values of the field 'Position Name'.
In visual force page can u help me how to get the values of the field 'Position Name' from QTPPosition object.
I am getting the values of standard field 'QTPPositionName' that is created on 'QTPPosition' object.

 

Can someone help me on this requirement.

cmlcml

You have to query for that using relationship in visualforce page. I am assuming 'QTPPositionRelated__c' is the custom lookup field on QTP Status object. Then your query will be something like this:

 

QTPStatus qs=[select Id, name, QTPPositionRelated__r.Position_Name__c from QTPStatus where id=:<QTPStatus Id>][0];