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 365 | Integration, Dataverse...
Answered

Routing a portal created incident based on language selected on portal page

(1) ShareShare
ReportReport
Posted on by 5

We have multiple languages enable in our Customer Self-Service portal, allowing users to select the language the portal displays. All stock functionality.

We have a request from the business to route cases submitted via the portal based on the language selected on the portal page (the top right navigation menu).  Not based on preferred language of the contact, as that is not something we are currently utilizing (although I suppose we could if we had to)

I'm not concerned about the routing, but more the detecting of the selected language and conveying that to CRM.  The most obvious mechanism to me would be setting a lookup to Language on the incident, but that assumes I can set the lookup using information on the portal page.

If there is an out-of-the-box or easier method to accomplish this that would be helpful.

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at
    RE: Routing a portal created incident based on language selected on portal page

    Hi wesleynixon,

    If you enabled multiple language in portal, it will show language code of selected language in the URL of the portal.

    pastedimage1639042554167v3.png

    You can add one custom field to case form, and add js to fill the field with language code from url:

    pastedimage1639042762562v5.png

    pastedimage1639042612042v4.png

    Js:

    $(document).ready(function() {
    var URLs = window.location.href;
    var language = URLs.slice(37, 42);//Intercept the value you need
    $("#new_language").val(language);//local name of the new field
    });

    Test Result:

    pastedimage1639042805235v6.png

  • wesleynixon Profile Picture
    5 on at
    RE: Routing a portal created incident based on language selected on portal page

    Thank you for the answer.  I tweaked it slightly to the below, so it would work in all of our environments and not be dependent on exact character position:

    var language = window.location.href.split('/')[3];

    $("#new_language").val(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

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 77 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 57 Most Valuable Professional

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 52 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans