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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Button/Javascript for changing queue

(0) ShareShare
ReportReport
Posted on by 15

Hello,

We have a small customer service group who changes between queues in the queue times views. In the unified interface, the default path when pressing the "Queue items" button is routing the user to it's own personal queue. Which is fine.

The issue is, we have a other queue in which the customer service agent needs to go to quite often. They could use the dropdown menu to change the queue, but it would be easier with a button on the ribbon. 

I tried to look through the documentation, however I am not skilled enough to write a javascript for this. Does anybody have a similar issue? How did you solve it?

Basically, I would like to have a button called "Servicedesk", and pressing this would change the queue to show "All items" in a specific queue.

I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Do you mean you want to add a button on the queue entity list page and when you click on this, D365 will change to another special view?

    If so, actually you should only add a new button on Queue Item list and when clicking on it, let the page direct to the URL for your special queue.

    Each view has its own URL, you could get the URL you need first, and then use it in you JS code.

    For example, when I show All Items in Support Queue, the URL is:https://OrgURL.crm.dynamics.com/main.aspx?appid=1102ae85-4d94-ea11-a811-000d3a192986&pagetype=entitylist&etn=queueitem&viewid=2d8d408d-c255-4587-9e34-596d496e6738&viewType=1039

    pastedimage1594346138070v1.png

    So after get this you should add a ribbon in ribbon workbench.

    pastedimage1594356710671v2.png

    Here's the code.

    function directQueue() {
        var pageInput = {
            pageType: "entitylist",
            entityName: "queue",
            viewId: "2d8d408d-c255-4587-9e34-596d496e6738",
    
        };
        var navigationOptions = {
            target: 1
    
        };
        Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
            function success() {
                // Run code on success
            },
            function error() {
                // Handle errors
            });
    }

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/navigateto

    Best Regards,

    Leo

  • Thorsortevik Profile Picture
    15 on at

    Hello,

    Thank you. Many good pointers here.

    My intent is not to change the view, but only the queue. Does the combination of "View" and "Queue" have it's on URL? Because the URL does not change when I change queues in the queue item list view.

    For instance, I am handling 2 queues.

    My personal queue: Thor

    The servicedesk queue: Servicedesk

    When I press home, I get directed to "All items" in my personal queue. I want to click the button to change only the queue. So it changes to "All items" in "Servicedesk".

  • Suggested answer
    Pankaj Gogoi Profile Picture
    3,177 on at

    As suggested by Leo, on click of the button you can change the view id and provide the entity name as Queue instead of QueueItem

    yourorgname.crm.dynamics.com/main.aspx?appid=78e1a6df1-75be-ea11-a812-000d3a3e1799&forceUCI=1&pagetype=entitylist&etn=queue&viewid=8c415551-a9c2-ea11-a812-000d3a3e1af1&viewType=1039

    You should create new view and filter it by ServiceDesk Queue and provide this view id in the url. You can modify the sub area Queue url using the App Designer to load the QueueItem entity instead of Queue.

    Hope this helps.

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans