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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to get environment URL using JavaScript in Mobile App?

(0) ShareShare
ReportReport
Posted on by 680

Hi Experts,

We have a functionality that sends the URL of the newly created record to Users. The issue is when User is using mobile app, we are unable to get the URL of the environment.

We are currently using "Xrm.Utility.getGlobalContext().getCurrentAppUrl();" to get the record URL but for Users using the app, this returns null.

How do we get the environment URL when using mobile app?

Kind Regards,

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: How to get environment URL using JavaScript in Mobile App?

    Hello,

    You can try using getClientUrl instead - docs.microsoft.com/.../getclienturl

  • LMP Profile Picture
    680 on at
    RE: How to get environment URL using JavaScript in Mobile App?

    Hi Andrew,

    I am now using getClientURL but the URL I am getting has --d (two dashes and d) on it. I am looking for another alternative if there is.

    I will be using this for now and just remove --d from the URL.

    Thank you.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 130

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 118 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans