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

Customer Portal Info



Is there a way of getting customer portal information in APEX?


For instance, I'd like to be able to get the portal ID so that I can conditionally display certain fields. 





I don't believe you can get the portalId in Apex directly.


But you could have seperate pages and apex associated to each respective customer portal profile(s) if you have multiple portals. Or if you are using Visualforce, you could pass in a querystring parameter into the page that the controller uses to determine which portal the page is being rendered in.