web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

javascript get org name from URL

(0) ShareShare
ReportReport
Posted on by 600

hi

I am trying to create a URL that navigates to contact, but the URL needs to be dynamics so it works in dev, test and prod.

Example:

DEV URL https://martind.crm4.dynamics.com/main.aspx#276111347

PROD URL https://prod.crm4.dynamics.com/main.aspx#276111347

How can I retrive the orgname? (martind, and prod) from the link with js and put it in a dynamicURL?

Thanks for answers

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Martin,

    By doing Xrm.Page.context.getClientUrl(); you get the client url dynamically. you dont need to sepcifically get the organization name.

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    otherwise explore this to get the organization related details including org unique name : docs.microsoft.com/.../organizationsettings  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans