Loading

Get Community ID using Apex

Udgivelsesdato: Nov 23, 2023
Beskrivelse
The mentioned snippet will retrieve the Ids of the Communities the running user has access to.
Løsning

The IDs of the Communities can be found when executing the following debug log statement:

System.debug('#####' + ConnectApi.Communities.getCommunities());

This statement retrieves the list of Communities the running user has access to.

Additional Reference: More on the communities class methods

Vidensartikelnummer

000386512

 
Indlæser
Salesforce Help | Article