Code
Walk-through
We have first retrieved aContact entity using the ContactAgent. And then used its Interests property to retrieve the contact’s interests into a SelectableMDOListItem array.
Next, we iterate on the array and change its Boolean Selected property status. By using the SaveContactEntity method available in the Contact agent, we save the modifications made to the entity.