Skip to content

Instantly share code, notes, and snippets.

@shrutis22
Last active October 15, 2016 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shrutis22/963e25a137a00bbc10b56ee5a93faf3b to your computer and use it in GitHub Desktop.
Save shrutis22/963e25a137a00bbc10b56ee5a93faf3b to your computer and use it in GitHub Desktop.
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