How to retreive domain name from salesforce orgCan I simply disable an automatically created identity provider?Can not log into org with 'My Domain' due to HSTSdomain name in our orgCan the My Domain feature support multiple domainsRisks of deploying My Domain before the upcoming instance refresh?How to get your Custom Domain Name if you have Mydomain enabled - using Apex?Continuous Site Switching and My DomainEnabling MydomainSalesforce api.status.salesforce.com returns no data
How to prevent clipped screen edges on my TV, HDMI-connected?
How to respectfully refuse to assist co-workers with IT issues?
How do I prevent other wifi networks from showing up on my computer?
Why do banks “park” their money at the European Central Bank?
How to gently end involvement with an online community?
How much does Commander Data weigh?
Duplicate instruments in unison in an orchestra
"Sorry to bother you" in an email?
What is the difference between "Grippe" and "Männergrippe"?
How to know which loss function is suitable for image classification?
If an earthquake can destroy buildings why it cant kill us according to physics?
Can I get temporary health insurance while moving to the US?
Tex Quotes(UVa 272)
How do I make my image comply with the requirements of this photography competition?
Architectural feasibility of a tiered circular stone keep
Are there any elected officials in the U.S. who are not legislators, judges, or constitutional officers?
Can a Rogue PC teach an NPC to perform Sneak Attack?
What would make bones be of different colors?
Did anyone try to find the little box that held Professor Moriarty and his wife after the crash?
Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?
Prevent use of CNAME Record for Untrusted Domain
New Math Formula?
How do we calculate energy of food?
How do you harvest carrots in creative mode?
How to retreive domain name from salesforce org
Can I simply disable an automatically created identity provider?Can not log into org with 'My Domain' due to HSTSdomain name in our orgCan the My Domain feature support multiple domainsRisks of deploying My Domain before the upcoming instance refresh?How to get your Custom Domain Name if you have Mydomain enabled - using Apex?Continuous Site Switching and My DomainEnabling MydomainSalesforce api.status.salesforce.com returns no data
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Select id,Domain from domain , this query does not return any records. I am trying to retrieve domain name in my salesforce org so that i can append it to that to any new user's username in salesforce at the time of creation.
Did anybody face this issue and if so , how did you overcome this?
Thanks,
Asha
mydomain
add a comment |
Select id,Domain from domain , this query does not return any records. I am trying to retrieve domain name in my salesforce org so that i can append it to that to any new user's username in salesforce at the time of creation.
Did anybody face this issue and if so , how did you overcome this?
Thanks,
Asha
mydomain
add a comment |
Select id,Domain from domain , this query does not return any records. I am trying to retrieve domain name in my salesforce org so that i can append it to that to any new user's username in salesforce at the time of creation.
Did anybody face this issue and if so , how did you overcome this?
Thanks,
Asha
mydomain
Select id,Domain from domain , this query does not return any records. I am trying to retrieve domain name in my salesforce org so that i can append it to that to any new user's username in salesforce at the time of creation.
Did anybody face this issue and if so , how did you overcome this?
Thanks,
Asha
mydomain
mydomain
asked Aug 12 at 16:33
AshaAsha
111 bronze badge
111 bronze badge
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Url.getSalesforceBaseUrl will return your "my domain" URL (e.g. https://mydomain.my.salesforce.com/), and you can get the Host from here:
String myDomain = Url.getSalesforceBaseUrl().getHost();
The Domain object is related to Site.com, which is not your intent.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273300%2fhow-to-retreive-domain-name-from-salesforce-org%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Url.getSalesforceBaseUrl will return your "my domain" URL (e.g. https://mydomain.my.salesforce.com/), and you can get the Host from here:
String myDomain = Url.getSalesforceBaseUrl().getHost();
The Domain object is related to Site.com, which is not your intent.
add a comment |
Url.getSalesforceBaseUrl will return your "my domain" URL (e.g. https://mydomain.my.salesforce.com/), and you can get the Host from here:
String myDomain = Url.getSalesforceBaseUrl().getHost();
The Domain object is related to Site.com, which is not your intent.
add a comment |
Url.getSalesforceBaseUrl will return your "my domain" URL (e.g. https://mydomain.my.salesforce.com/), and you can get the Host from here:
String myDomain = Url.getSalesforceBaseUrl().getHost();
The Domain object is related to Site.com, which is not your intent.
Url.getSalesforceBaseUrl will return your "my domain" URL (e.g. https://mydomain.my.salesforce.com/), and you can get the Host from here:
String myDomain = Url.getSalesforceBaseUrl().getHost();
The Domain object is related to Site.com, which is not your intent.
answered Aug 12 at 16:39
sfdcfoxsfdcfox
283k14 gold badges231 silver badges485 bronze badges
283k14 gold badges231 silver badges485 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f273300%2fhow-to-retreive-domain-name-from-salesforce-org%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown