Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

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

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.

  • wesleynixon Profile Picture
    wesleynixon 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);

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans