Crm 2011 Javascript - Get related QueueItem RRS feed

  • Question

  • I'm working on some queue management buttons and I’m having a bit trouble with one.

    I want to retrieve the queue item id’s of a selected entity.

    Scenario: Select an activity in sub-grid, Click button, edit related queue items through JavaScript.

    I know that the relation between activity and queue item is a M:N relation, but not how to use it with JavaScript. I’ve got the id’s from the activities so the only thing left is the related queue items.

    Any ideas?

    Thursday, June 20, 2013 12:01 PM

All replies

  • Have you found a solution? I'm in a similar situation and banging my head....
    Thursday, November 6, 2014 6:34 PM
  • Hi,

    Yes, it took me a while, but I got it build =)

    You need to first get the queueitem entity, then get the id from the lookup "Queue Item".
    Then you can fetch the item it self.

    1. Get the selected QueueItem id
    2. Get the ID of the related object from the "Queue Item" lookup with SOAP or preferred method
    3. Now you can fetch the related item through SOAP or preferred method
    4. Edit as you wish and save
    5. Return with callback to update sub-grid when it's finished.

    I only used it to update the current queue and assigned user, so I had preset information to use.

    I don't have any script's left to share though. We scraped MS CRM a while back =)

    Good luck!

    Friday, November 7, 2014 7:47 AM