The following are constructors for Network.
The following are methods for Network. All methods are static.
public static String communitiesLanding()
Type: PageReference
If Communities isn’t enabled for the user’s organization or the user is currently in the internal organization, returns null.
public static PageReference forwardToAuthPage(String startURL)
Type: PageReference
If Communities isn’t enabled for the user’s organization or the user is currently in the internal organization, returns null.
public static String getLoginUrl(String networkId)
Type: String
Returns the full URL for the Lightning Platform or Community Builder page used as the login page in the community.
public static String getLogoutUrl(String networkId)
Type: String
Returns the full URL for the Lightning Platform page, Community Builder page, or Web page used as the logout page in the community.
public static String getNetworkId()
Type: String
If Communities isn’t enabled for the user’s organization or the user is currently in the internal organization, returns null.
public static String getSelfRegUrl(String networkId)
Type: String
Returns the full URL for the Lightning Platform or Community Builder page used as the self-registration page in the community.
public static Integer loadAllPackageDefaultNetworkDashboardSettings()
Type: Integer
If Communities is enabled, and the Salesforce Communities Management package is installed, maps the dashboards provided in the package onto each community’s unconfigured dashboard settings. Returns the number of settings it configures. This method is invoked automatically during community creation and package installation, but isn’t typically invoked manually.
If Communities isn’t enabled for the user’s organization or the user is in the internal organization, returns 0.
public static Integer loadAllPackageDefaultNetworkPulseSettings()
Type: Integer
If Communities is enabled, and the Salesforce Communities Management package is installed, maps the Insights reports provided in the package onto each community’s unconfigured Insights settings. Returns the number of settings it configures. This method is invoked automatically during community creation and package installation, but isn’t typically invoked manually.
If Communities isn’t enabled for the user’s organization or the user is in the internal organization, returns 0.