+ Start a Discussion

How to get the default portal info in apex class?

Hi All,


We have a default portal in custom portal setting.


There is a trigger, which needs to get user's organization id and portal id, I checked document and get the organization id, but can not get portal id.


I found portal object is defined in medadata, which is "Portal" object. Is it possible to get default portal id in apex class?