Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6857935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:05:40+00:00 2026-05-27T02:05:40+00:00

I want to assign record to a particular queue in my Silverlight application. I

  • 0

I want to assign record to a particular queue in my Silverlight application.

I display a list of record, and the user can select one or many record. Then I display a list of queue, and the user select the Queue in which he want to add those records.

I’ve followed this example:

http://msdn.microsoft.com/en-us/library/gg309558.aspx

I’ve tried different way but it never worked.

First,

I’ve tried to create an “empty” QueueItem: (some parts of the code are missing, for example there is no Queue record here but it’s not important, it’s just to show you the issue)

internal void AddBillingToQueue()
    {
        QueueItem item = new QueueItem();

        context.AddToQueueItemSet(item);

        context.BeginSaveChanges(OnCreateCompleted, item);
    }

    private void OnCreateCompleted(IAsyncResult result)
    {
        QueueItem item = result.AsyncState as QueueItem
        DataServiceResponse response = context.EndSaveChanges(result);

        // Normally, the GUID shouldn't be empty anymore, 
        // but it fails at the EndSaveChanges line.
    }

The exception message said the objecttypecode was missing. So I tried again providing the object that I want to put in the queue.

internal void AddBillingToQueue(all_billing billing)
    {
        QueueItem item = new QueueItem();
        item.ObjectId = new EntityReference()
        {
            Name = billing.all_name,
            Id = billing.all_billingId,
            LogicalName = "all_billing"
        }

        context.AddToQueueItemSet(item);

        context.BeginSaveChanges(OnCreateCompleted, item);
    }

    private void OnCreateCompleted(IAsyncResult result)
    {
        QueueItem item = result.AsyncState as QueueItem
        DataServiceResponse response = context.EndSaveChanges(result);

        // again it fails
    }

The exception message now says that the QueueId is missing. So I tried providing also the reference to the Queue.

internal void AddBillingToQueue(all_billing billing, Queue queue)
    {
        QueueItem item = new QueueItem();

        item.ObjectId = new EntityReference()
        {
            Name = billing.all_name,
            Id = billing.all_billingId,
            LogicalName = "all_billing"
        }


        item.QueueId = new EntityReference()
        {
            Name = queue.Name,
            Id = queue.QueueId,
            LogicalName = "Queue"
        };

        context.AddToQueueItemSet(item);

        context.BeginSaveChanges(OnCreateCompleted, item);
    }

    private void OnCreateCompleted(IAsyncResult result)
    {
        QueueItem item = result.AsyncState as QueueItem
        DataServiceResponse response = context.EndSaveChanges(result);

        // again it fails
    }

And here, the exception message is this one:

<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>
<error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">
<code>-2147217150</code>
<message xml:lang=\"nl-BE\">Queue</message>
</error>

According to this site ( http://www.cub-e.net/post/Microosft-Dynamics-CRM-Error-Code-List.aspx ), the code means: The specified entity was not found. I suppose it means that Queue hasn’t been found.

But the GUID provided is definitely right because it has been retrieved from the same context.

So, if I provide the Queue Id, it fails. And if I don’t, it fails to. What have I missed? Does someone have already work with QueueItem and REST endpoint?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:05:40+00:00Added an answer on May 27, 2026 at 2:05 am

    This may be pointing out the obvious, you did mention that not all the code is there so I did wonder if this is a side effect of that but the line.

    LogicalName = "Queue"
    

    Jumped out at me as using the rest endpoint is case sensitive as far as the entity name is concerned (ie all lowercase) so it may not be able to find the queue due to this.

    Apart from that, if your application is showing queues to the user for assigning items this point may also be a mute but if it’s the actual record it cannot find make sure there are permissions to be able to see the queue, add to the queue / assign the item your attempting to put into the queue.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my full text search query, I want to assign particular columns a higher
I want a Repeater control inside a Gridview row. So how can I assign
If I want to declare a vector of unknown size, then assign values to
Question One I have var example : array[0..15] of char; I want to assign
I want to assign the decimal variable "trans" to the double variable "this.Opacity". decimal
I want to assign a resource I already have a second name, similar to
I want to assign a class attribute via a string object - but how?
I feel like a bonehead: I want to assign index=i to each LI I
Let's say I create an instance of a class and want to assign some
I am working on struts2. In my jsp page I want to assign the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.