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
FighterneversetbackFighterneversetback 

Hi Guys, I tried adding a column in which the data is in readable form and when it is clicked we can edit that data something like editable link on readable data. I tried using following code but was shown error. Can someone please help?

Error I am getting is: SObject row was retrieved via SOQL without querying the requested field: LLC_BI__Loan__c.LLC_BI__CloseDate__c 

My Visualforce Page:
 <apex:column HeaderValue="Projected Closing Date">
                 <!-- <apex:outputLink value="/{!a.loanObj.LLC_BI__CloseDate__c}" target="_blank">{!a.loanObj.LLC_BI__CloseDate__c}</apex:outputLink> -->
                  <apex:outputLink value="/{!a.loanObj.Id}" target="_blank">{!a.loanObj.LLC_BI__CloseDate__c}</apex:outputLink>
                  <!-- <apex:outputLink rendered="{!isEdit}" value="/{!a.loanObj.Id}" target="_blank">{!a.drownReq.Loan_Name__r.LLC_BI__CloseDate__c}</apex:outputLink> -->
              </apex:column>

My Apex Class:
Query has been done on Child class.

The field I want to show is of Parent class and the query has been done on child class(M-D relationship). I tried checking the whole code but could ot find the problem.

 
Kai Herng LauKai Herng Lau
Hi, 

do you mind to double check your apex controller class. The error message is showing that the 'LLC_BI__Loan__c.LLC_BI__CloseDate__c' is not in your SOQL query. If you don't mind, you can share the apex code here
Suraj TripathiSuraj Tripathi

Hi,

Please try this to __r like:   'LLC_BI__Loan__r.LLC_BI__CloseDate__c'

And make sure you have query on LLC_BI__CloseDate__c.

Regards,

Suraj

FighterneversetbackFighterneversetback
Hi Actually on Apex side teh query is been done on Child Table so to retrieve record from Parent table(Loan), I am using ChildRelationship name.Parent field and teh query is working fine in Query editor but in VF page I am using wrapper class object (of Parent table 'Loan') but it is throwing error. 

Please suggest.
Aman MalikAman Malik
Hi,
Kindly post your code snippet here.
Thanks