Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gets the details of all the Projects in Project custom object.
public class ProjectPortfolioController {
public List<Project__c> allProjects { get; set; }
public ProjectPortfolioController() {
allProjects = new List<Project__c>();
fetchProjects();
}
public void fetchProjects() {
allProjects = [
SELECT Name
,Project_Description__c
,Project_Link__c
,Caption_Animation__c
,Caption_Style__c
,Description_Animation__c
,Description_Style__c
,Featured_Image__c
,Featured_Image_Style__c
,Slide_Style__c
,View_Button_Class__c
,Blog_Link__c
FROM Project__c
ORDER BY Name
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment