Could we query community pages or lighting applications built from app builder through SOQL?

I tried to query the new built applications through this SOQL statements. But didn't find any. Or which table I should query for the lightning applications/pages created by app builder

    FROM AuraDefinitionBundle ORDER BY CreatedDate DESC 



You are looking for FlexiPage. You can query this object via the Tooling API or Metadata API. For example, this query works in the Query Editor if you check the Use Tooling API option:

SELECT Id, Description, DeveloperName, EntityDefinitionId FROM FlexiPage
  • SELECT Id, Description, DeveloperName, EntityDefinitionId FROM FlexiPage, INVALID_TYPE: sObject type 'FlexiPage' is not supported.?? – Dummy Aug 2 '18 at 16:28
  • @Dummy You can't run tooling queries natively in Apex. Notice how I recommend to run this query. If you want to run it from Apex, you will have to manually call out to the Tooling API. There are many Q&A threads on this site about how to do so. – Adrian Larson Aug 2 '18 at 16:34
  • @AdrianLarson are you sure it works for community site pages? I just created a site page in builder and none of those pages returned. Flexipage seems to be those pages related to objects. – ebt Feb 19 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.