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

SelectedControlSelectedItemIds not working correctly on Ribbon workbench - with Unified Interface - Queue Item

(0) ShareShare
ReportReport
Posted on by 190

We are passing the parameter SelectedControlSelectedItemIds to a JavaScript function from a custom ribbon button. We are using this to pick queue items from a queue. The Pick button is not the OOB button, it is a custom Pick button. The parameter correctly provides the GUID of the entity record (Email or Case) held in the queue item in the old legacy interface but when we use the same parameter in the new Unified Interface the same paramater returns the GUID of the queue item record instead of the case or email that is stored within the queue item. We have justr discovered this while testing the new interface.

Any advice appreciated. I have tried all the other parameters available on the ribbon workbench but none bring back the GUID I need.

Thanks

Phil

I have the same question (0)
  • Verified answer
    Henry J. Profile Picture
    5,237 on at
    RE: SelectedControlSelectedItemIds not working correctly on Ribbon workbench - with Unified Interface - Queue Item

    Hi Phil,

    I wasn't aware of that change of behavior.
    Can you try from the Queue GUID to retrieve the related record's entity type and GUID? You might be able to achieve your goal that way.

    Can you open a Support Request to check if this is by design (some behaviors have changed on purpose in the Unified Interface) or if it's a bug?
    https://admin.powerplatform.microsoft.com/support

    Henry

  • Suggested answer
    fillcrocker Profile Picture
    190 on at
    RE: SelectedControlSelectedItemIds not working correctly on Ribbon workbench - with Unified Interface - Queue Item

    Hi Henry,

    Thanks for the reply and suggestion. I was able to get what I needed by using the queue item GUID as you suggested.

    Phil

  • Ics_rthompsoneu Profile Picture
    74 on at
    RE: SelectedControlSelectedItemIds not working correctly on Ribbon workbench - with Unified Interface - Queue Item

    If you can.  Please post the example of what you did to resolve your issue.

    Thanks

  • Verified answer
    fillcrocker Profile Picture
    190 on at
    RE: SelectedControlSelectedItemIds not working correctly on Ribbon workbench - with Unified Interface - Queue Item

    I used this function to retrieve the GUID of the related record wrapped in the queue item record (not sure that is correct term)

    selectedControlItemId is the queue item GUID

    queuItemId is the returned GUID of the related record

    I used Jason Latimer's CRM REST builder as it was a bit tricky to get the related record from the queue item record

    var getRelatedQueuItemRecordId = function (selectedControlItemId) {
        
        var urlString = "/api/data/v9.1/queueitems(" + selectedControlItemId.toString() + ")?$select=_objectid_value,objecttypecode,_queueid_value,queueitemid"
        var req = new XMLHttpRequest();
        var queueItemId = null;
        var _objectid_value_lookuplogicalname = "";
        var req = new XMLHttpRequest();
        req.open("GET", Xrm.Page.context.getClientUrl() + urlString, false);
        req.setRequestHeader("OData-MaxVersion", "4.0");
        req.setRequestHeader("OData-Version", "4.0");
        req.setRequestHeader("Accept", "application/json");
        req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
        req.onreadystatechange = function() {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 200) {
                var result = JSON.parse(this.response);
                var _objectid_value = result["_objectid_value"];
                queueItemId = _objectid_value;
                
            } else {
                Xrm.Utility.alertDialog(this.statusText);
            }
        }   
    };
    req.send();
    return queueItemId;
    };

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 242

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 68 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans