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
Arvind010Arvind010 

How to show entered values in edit mode without query?

For a visual force page, i am using standard controller(Parent object) with multiple extension classes(for child objects). When i click save button in the page, i will be navigating to the same page along with parent object id. How can i show the values of child objects in edit mode without having a query in method? I tried with the following code where OrderLineItem is from Parent object(OrderLineItem).

public CW_EXT_CircuitDetails(ApexPages.StandardController controller){
try{
OrderLineItem=(Order_Line_Item__c)controller.getRecord();
}
catch(Exception e){}
}
 

 

public void sortCircuitDetails(){
for(Circuit_Details__c CirDet:OrderLineItem.Circuit_Detailss__r){
CircuitDetailList.add(CirDet);
}
}

 

If I try to use sortCircuitDetails method to get the inserted records, i am getting error message saying "SObject row was retrieved via SOQL without querying the requested field: Order_Line_Item__c.Circuit_Detailss__r".

 

Can anyone please suggest to show the entered records in edit mode without querying in the method.