Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Redirect user based on location

Posted on by 65

Hi,

We have a unique requirement very similar to mvc websites. We want to redirect user based on the location. For example if the user visits our portal from UK then user should be redirected to en-gb page. How can we achieve this in Dynamics 365 portal / Adxstudio portal. 

Thanks

Uday

*This post is locked for comments

  • Suggested answer
    Colin V Profile Picture
    Colin V on at
    RE: Redirect user based on location

    With v8.x you would need to do this detection with JavaScript and then do a redirect there.  Javascript does have the ability to detect browser language, however because it is Javascript you rely on client side processing and redirection, so there will be at least a particial page load using JS to do this.  You will want to try and locate this JS as high up in the DOM as possible so it executes right away. If with v7 you could do JS or server side code.

    Checkout the following stackoverflow question and answer for some direction on how to do it in JS.

    stackoverflow.com/.../javascript-redirection-according-to-browser-language

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans