Compare Activity Party List Users RRS feed

  • Question

  • Hi All,

    Today i have a Scinario that i need to Compare Pre and Post Image of party List and i need to add the users in Access Teams..

    My Scinario is :

    --> On update of requiredattendees i need to check weather any new Users Added or not. If Added i need to Add them in Access Team.

          --> On Update of requiredattendees i need to check any Existing users removed or not. If removed i need to remove them from Access Team.

    For Achieving below Scinario i need to Use Pre and Post Image. Can Any one Guide me to achieve this in c# Plugins.

     EntityCollection PostRecipients = postImageEntity.GetAttributeValue<EntityCollection>("requiredattendees");
     EntityCollection PreRecipients = preImageEntity.GetAttributeValue<EntityCollection>("requiredattendees"); 

    for (int j = 0; j < PostRecipients.Entities.Count; j++)
    ActivityParty PostAP = PostRecipients[j].ToEntity<ActivityParty>();                                
    for (int j = 0; j < PreRecipients.Entities.Count; j++)
    ActivityParty PreAP = PreRecipients[j].ToEntity<ActivityParty>();

    I need to Compare PostAP and PreAP and i need to get Value as which user Added and which User Removed.

    • Edited by JERRY_TP Saturday, February 20, 2016 7:35 AM
    Saturday, February 20, 2016 7:26 AM