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)

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

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