You need to sign in to do that
Don't have an account?
Shiv Shankar 80
How can i check Community settings are enable or not using apex?
Hi,
Can anyone help me in this regard.
How can i check Community settings are enable or not using apex?
Thanks in advance.
Can anyone help me in this regard.
How can i check Community settings are enable or not using apex?
Thanks in advance.
You can do that using Force.com REST API
You need to add your url in remote site setting..
try{
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setMethod('GET');
String endpoint = 'url of your instance/services/data/v39.0/connect/organization';
request.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());
request.setEndpoint(endpoint);
HttpResponse response = http.send(request);
if( response.getStatusCode() == 200 )
system.debug(response.getBody());
}catch(Exception Ex){
System.debug('Error Occurred :: '+Ex.getMessage());
}
you can check in response.getbody();