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
dhcrusoedhcrusoe 

A query not displaying on the Apex page?

Hi there,

 

We're trying to get (what seems to be) a simple query to display on a page through {!lastUpdated}. However, for some reason, we neither receive an error, nor receive information displayed through the query. Any ideas?  Thanks!

 

--Dave

 

Code:

 

public class appDetailExtension { Private string ctContactId; Private string apprenticeshipID; public appDetailExtension(ApexPages.StandardController controller) { } public appDetailExtension(ApexPages.StandardSetController controller) { setMyValues(); } private String lessonPlanID; public String getlessonPlanID (){ return lessonPlanID; } public void setlessonPlanID(String v){ lessonPlanID =v; } private String lastModified; public String getlastModified (){ return lastModified; } public void setlastModified (String v){ lastModified =v; } private String lastCtModified; public String getlastCtModified (){ return lastCtModified; } public void setlastCtModified(String v){ lastCtModified =v; } Public void setMyValues(){ PageReference pageRef = System.currentPageReference(); apprenticeshipID = pageRef.getParameters().get('id'); Lesson_Plan__c myVar = [select Lesson_Plan__c.id, Lesson_Plan__c.lastmodifieddate, Lesson_Plan__c.Last_CT_Modified__r.Name from Lesson_Plan__c where Lesson_Plan__c.Apprenticeship__r.id = 'a0GR0000001AjI3MAK' and Lesson_Plan__c.Lesson_Number__c = '1']; lessonPlanId = myVar.id; lastModified = String.valueOf(myVar.lastmodifieddate); lastCtModified = myVar.Name; } }