locked
dictionary for lookup field values RRS feed

  • Question

  • Hi,
    I would like to know how to build a dictionary for the retrieved lookup field entity in CRM. Someone please guide me through this or article link would be helpful.
    Thanks.



    • Edited by ReignFan Monday, November 2, 2015 8:22 PM
    Monday, November 2, 2015 8:22 PM

Answers

  • Are you referring to the .Net Dictionary object ? If so, use a RetrieveMultiple request to get the lookup entity data, then iterate through the EntityCollection, and add each entity in turn to the Dictionary instance.

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by ReignFan Wednesday, November 4, 2015 9:32 PM
    Tuesday, November 3, 2015 2:39 AM
    Moderator

All replies

  • Are you referring to the .Net Dictionary object ? If so, use a RetrieveMultiple request to get the lookup entity data, then iterate through the EntityCollection, and add each entity in turn to the Dictionary instance.

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    • Marked as answer by ReignFan Wednesday, November 4, 2015 9:32 PM
    Tuesday, November 3, 2015 2:39 AM
    Moderator
  • Yes. Thank you for the suggestion. I got it worked like you suggested.

    Mittu

    Wednesday, November 4, 2015 9:32 PM