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 :
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
    Antonio Lamanna Profile Picture
    165 on at
    RE: How to get clientUrl (base url) in javascript

    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

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: How to get clientUrl (base url) in javascript

    You can try below code:

    var globalContext = Xrm.Utility.getGlobalContext();

    globalContext.getClientUrl();

  • kunalks2003 Profile Picture
    315 on at
    RE: How to get clientUrl (base url) in javascript

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

  • Suggested answer
    Bilal Itani Profile Picture
    92 on at
    RE: How to get clientUrl (base url) in javascript

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

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans