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
Ranu JainRanu Jain 

query on folders



  i have to create a page in which i select a folder and  then i have to show all list of templates in that folder.

but problem is that  in query i am only getting custom folders..not visual force forlders,  like   unfield public email template



Best Answer chosen by Admin (Salesforce Developers) 
ForceMantis (Amit Jain)ForceMantis (Amit Jain)

"Unfiled Public Email Templates" and "My Personl Email Template" are system folders that are not returned if you query Folder table.


To get these you have hard-code their Ids.


Unfiled Public Email Template folder Id - UserInfo.getOrganizationId()

Personal Email Template folder Id - UserInfo.getUserId()