web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Queue Item not correctly showing, when trying to disable/delete a queue, an error occurs

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

ISSUE DESCRIPTION

=============
On Model driven app + Copilot service admin center, when trying to disable/delete a queue, an error occurs.

Error message: 

Business Process Error
As there are active queue items associated with
this queue, this operation cannot be completed.
Please deactivate or delete active queue items
before trying to deactivate the queue.

But when we go inside the queue to deactivate 12 queue items, we cannot see any queue item inside.

This block customer to disable/delete a queue.

 

HOW TO FIX

=========

As these records are “orphaned” legacy queue items and these records are technically still active in the database but are invisible to Omnichannel agents, which prevents the queue from being disabled or deleted.
 
To resolve this, the queue items need to be updated from Active to Inactive. Please follow the steps below:
 
Step 1: Get the Queue ID
Open the affected queue and copy the Queue ID from the browser URL.
 
Step 2: Retrieve the Queue Item IDs via API
Replace <Queue ID> with the actual value:
==================================================
XXX.dynamics.com/api/data/v9.2/queueitems?$select=queueitemid&$filter=_queueid_value eq <Queue ID> and statuscode eq 1
==================================================
 
Step 3: Run the script to deactivate the queue items
Replace the queueItemIds with the IDs returned from the API.
Press F12, go to console tab to run as below.
==================================================
const queueItemIds = [
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
];
 
Promise.all(
queueItemIds.map(id =>
Xrm.WebApi.updateRecord("queueitem", id, {
statecode: 1, // Inactive
statuscode: 2 // Removed
})
.then(() => console.log("✅ Deactivated:", id))
.catch(e => console.error("❌ Failed:", id, e.message || e))
)
).then(() => console.log("🎉 All queue items processed"));
==================================================
 
Once these orphaned items are deactivated, the queue should no longer be blocked and can be managed as expected.
 
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    145 on at
    In Microsoft Dynamics 365 (Model-driven app / Copilot Service admin center), you may see this error when deleting or disabling a queue:

    “Active queue items exist, cannot complete operation”
    Even though:
    • No queue items are visible in UI 
    Root Cause
    There are orphaned queue items in Microsoft Dataverse
    These records:
    • Still exist in the database 
    • Are marked as Active 
    • But are not visible in the UI 
    This blocks queue deletion/deactivation
    Solution (High-level)
    • Get Queue ID
      • From browser URL
    • Retrieve hidden queue items via API
      • Query active items using Web API
    • Deactivate those items via script
    • Update:
      • statecode = Inactive
      • statuscode = Removed
    Result
    • Orphaned records become inactive
    • Queue is unblocked
    You can now:
    • Delete
    • Disable the queue 

    Invisible (orphaned) queue items in Dataverse can block operations, and must be cleaned via API/script, not UI.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
NeerajPawar Profile Picture

NeerajPawar 31

#2
Robert Bailey Upzoids Profile Picture

Robert Bailey Upzoids 20

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 19 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans