Hi all,
I'm trying to write a plugin in C# that prevents two individuals coded as divorced from each other back in the same household as primary affiliates. The ex-spouse part is an association, of course.
I can determine if the person being added to a household is divorced from somebody through a lambda expression, like so...
var exSpouse = associationResponse.ResponseObject.Where(x => x.AssociationType.Id == 32 && x.Constituent.Id == newToHHCustomerNo).Count();
Where I am having trouble is determining if the individual being added to the household is divorced from any previously existing individual(s) in the household.
Does anybody have any code out there that does something remotely like what I'm doing? I would love to see what you have.
Thanks a million!
Matt