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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to get clientUrl (base url) in javascript

(0) ShareShare
ReportReport
Posted on by 92

Hello, how do I get the client URL in javascript?

I have tried with Xrm.Page.Context.getClientUrl but I believe this is deprecated.

I also trying with passing the context of the form to my method and still couldn't figure out how to get the client Url.

Anyone has any idea?

Thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bilal Itani Profile Picture
    92 on at

    Actually it worked with Xrm.Page.context.getClientUrl().

  • kunalks2003 Profile Picture
    315 on at

    following link has how to use it now  getClienUrl() . Xrm.Page And Xrm.Page.context is deprecated.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You can try below code:

    var globalContext = Xrm.Utility.getGlobalContext();

    globalContext.getClientUrl();

  • Suggested answer
    Antonio Lamanna Profile Picture
    165 on at

    Follw this link, it explain the new way to get clientUrl and form data for the version 9.0 debajmecrm.com/.../xrm-page-is-deprecated-with-version-9-0-how-do-i-get-the-clienturl-and-form-data-in-ribbon-actions

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans