You need to sign in to do that
Don't have an account?

How can we get the Organization instance ?
Good day,
I try using following code and i get null at all ? can someone please let me know why do i miss out to get such info ?
System.debug('domain string : ' +Site.getDomain());
System.debug('getCustomWebAddress string : ' +Site.getCustomWebAddress());
System.debug('getCurrentSiteUrl String :' +Site.getCurrentSiteUrl());
System.debug('Sub domain String :' +Site.Subdomain);
System.debug('TopLevelDomain String :' +Site.TopLevelDomain);
System.debug('getOriginalUrl String :' +Site.getOriginalUrl());
between, i would like to get the organization instance name but is there a method to retrieve it ?
ie: www.mycompany.com.jp ....what i want is to get back the 'mycompany' ? how i can do that ?
Thank you !
Hi,
Be aware that you can't access the Organization object with a Standard Platform user.
We created a setup page invisible to the customer in order to store organization related informations.
Laurent
Thanks Lauren,
Our company using enterprise version , is there any setting required to enable it ? appreciated your guidance on this !
Nakata, did you ever get a response/solution to this? We have Enterprise as well and I'm not finding any documentation whatsoever as to why these Site classes are returning null values in Apex code (other than this post).
Really frustrating. Trying to prepare for the subdomain change in two weeks and Apex classes are the last place we've hardcoded it in.