locked
Retrieve method not returning Queue Item RRS feed

  • Question

  • I have a PostEmailCreate-plugin that check if a newly created email is a queue item of Queue X.
    Here is the code that use the Guid's from the mail and the queue and it check agains the Queue Item entities (this code is run in the PostEmailCreate-step):

    My problem is that the "retrieve"-method doesn't return any hits. While I know  that the mail is clearly in the queue, by checking the Guid's against the database:

    Why doesn't I get any hit from the retrieve-method? I have tried using both RetrieveMultiple and RetrieveMulipleRequest with same result (zero entities). Is it "too early" to call the method? Do they need time to get a relation created?

    I hope someone can help me :-)

    regards,

    Marius H. Enerud

    Thursday, January 19, 2017 3:07 PM

Answers

  • I found the solution!

    The plugin step needed to be asyncronous.

    Thanks for all tips!

    regards,

    Marius

    • Marked as answer by morris80 Saturday, January 21, 2017 9:58 PM
    Saturday, January 21, 2017 9:58 PM

All replies

  • Hi morris,

    Do you want to trace the sourceQueue and emailId parameters inside the method and make sure they have correct values. Your code seems ok to me. In fact I tested it in a console application with hard coded values and it worked well.  


    Sachith Chandrasiri

    Friday, January 20, 2017 6:06 AM
  • Check queue is private or public?

    Regards Faisal

    Friday, January 20, 2017 9:20 AM
  • Queue is public.

    But I tried to have only the email.ID-criteria enabled and still it doesn't find the attachments

    ...but if I hard-code a mail-GUID (created a time ago) then I find a hit:

    why does this happen?



    • Edited by morris80 Saturday, January 21, 2017 11:33 AM
    Saturday, January 21, 2017 11:32 AM
  • I found the solution!

    The plugin step needed to be asyncronous.

    Thanks for all tips!

    regards,

    Marius

    • Marked as answer by morris80 Saturday, January 21, 2017 9:58 PM
    Saturday, January 21, 2017 9:58 PM