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 :
Microsoft Dynamics CRM (Archived)

Queue Cannot Be Deleted - Dynamics 365 9.0 On premise error

(0) ShareShare
ReportReport
Posted on by 5,237

Hi ,

I'm getting below OOB error while deleting Team record in Dynamics 365 9.0 version.

"You can't delete this queue because it has items assigned to it. Assign these items to another user/team, or queue and try again. If you contact support, please provide the technical details."

Error details:

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">You can't delete this queue because it has items assigned to it. Assign these items to another user, team, or queue and try again.</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><ActivityId>cd3b601e-db36-4c9c-b004-0f0a6fd4d079</ActivityId><ErrorCode>-2140991209</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"><KeyValuePairOfstringanyType><a:key>ApiExceptionSourceKey</a:key><a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">Plugin/Microsoft.Crm.ObjectModel.TeamService</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiOriginalExceptionKey</a:key><a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">Microsoft.Crm.CrmException: You can't delete this queue because it has items assigned to it. Assign these items to another user, team, or queue and try again. ---&gt; Microsoft.Crm.CrmException: You can't delete this queue because it has items assigned to it. Assign these items to another user, team, or queue and try again.
at Microsoft.Crm.ObjectModel.QueueServiceInternal`1.Delete(BusinessEntityMoniker moniker, ExecutionContext context)
at Microsoft.Crm.ObjectModel.QueueServiceInternal`1.DeleteOwnerQueues(Guid ownerId, Int32 ownerType, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamServiceInternal`1.DeleteTeamOwnedQueues(Guid teamId, ExecutionContext context)
at Microsoft.Crm.ObjectModel.TeamServiceInternal`1.DeleteInternal(BusinessEntityMoniker moniker, Boolean allowDeleteDefaultTeam, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepKey</a:key><a:value i:type="b:guid" xmlns:b="schemas.microsoft.com/.../Serialization">5fa38f5e-681d-4086-b706-09eadac11792</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiDepthKey</a:key><a:value i:type="b:int" xmlns:b="www.w3.org/.../XMLSchema">1</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiActivityIdKey</a:key><a:value i:type="b:guid" xmlns:b="schemas.microsoft.com/.../Serialization">cd3b601e-db36-4c9c-b004-0f0a6fd4d079</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiPluginSolutionNameKey</a:key><a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">System</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepSolutionNameKey</a:key><a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">System</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>You can't delete this queue because it has items assigned to it. Assign these items to another user, team, or queue and try again.</Message><Timestamp>2019-01-03T08:34:07.8282147Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault><ActivityId>cd3b601e-db36-4c9c-b004-0f0a6fd4d079</ActivityId><ErrorCode>-2140991209</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"/><Message>You can't delete this queue because it has items assigned to it. Assign these items to another user, team, or queue and try again.</Message><Timestamp>2019-01-03T08:34:07.8282147Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault i:nil="true"/><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException i:nil="true"/><TraceText i:nil="true"/></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

33745.Capture.PNG

Can anyone suggest me how I can override this ?

*This post is locked for comments

I have the same question (0)
  • Priyesh Profile Picture
    7,396 User Group Leader on at

    You'll need to clear the Queues contents before you can delete those.

    Either delete/remove the emails that came in queue.

    You should be able to then delete the Queue.

    Hope this helps.

  • Pawar Pravin  Profile Picture
    5,237 on at

    Hi Priyesh Wagh,

    Is there any way to override/remove this functionality ?

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Pravin,

    You can find the records assigned to particular queue using Advanced Find , so find them and reassign or delete them before delete.

    2019_2D00_01_2D00_03_5F00_15_2D00_53_2D00_00_5F00_queue.png

  • Pawar Pravin  Profile Picture
    5,237 on at

    Hi Goutam,

    Thanks for your reply. Actually I want to trigger plugin on delete of team for validation purpose but unfortunately it showing me above OOB error. So is there any way to remove above error without reassign or delete queue items

  • Verified answer
    Priyesh Profile Picture
    7,396 User Group Leader on at

    Hi Pravin,

    No, you can't override this. Since they are all out-of-the-box CRM plugins, we should not turn them off since they make the system unstable. Some of such errors might not be due to OOB plugins, but also SQL/logical errors that are bound to be shown.

    Hence, you can't override but in fact, just delete the associated Queue items.

    Hope this helps.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    One possibility to do the same deletion/assign process inside plugin before delete.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans