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
Ratheven SivarajahRatheven Sivarajah 

Call a custom controller method from a VF page and display the data

I am doing a soql on a custom object which is a lookup to a standard object(case). This works I changed the ending with an r Quote_Request__r. I dont know how to display Quote_Request__r..name.

--------------------------class--------------
public class operations_class{
    public List<Case> getNewCases(){
        List<Case> filterList = [SELECT AccountId,CreatedById,Quote_Request__r.name FROM case WHERE Id ='50005000005ym2OAAQ' ];
        return filterList;
    }
}

-----------------------------VFpage-----------------------------
<apex:page controller="operations_class">
    <apex:pageBlock>
        <apex:pageBlockTable   value="{!filterList}" var="a">        
                <apex:column value="{!a.Quote_Request__r.name}"></apex:column>      
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>
Best Answer chosen by Ratheven Sivarajah
AnkaiahAnkaiah (Salesforce Developers) 
Hi Ratheven,

Refer the below link and modify your code.
https://salesforce.stackexchange.com/questions/295767/retrieve-account-related-contacts

If this helps, Please mark it as best anwer.

Thanks!!