CRM 2013 – using Entity.GetAttributeValue instead of Entity.Contains – 10/16, Hosk's Dynamic CRM 2011 Blog

I found myself writing this tried and tested code, which I have written many times before

if (entity.Contains("salutation"))
{
     title = ( string)entity.Attributes["salutation"];
}

before you can get a value from the entity attributes you need to check the field is included in the list of parameters. I traditionally use to do this using entity.Contains(“fieldname”), if the field specified exists

..

Continue reading on Source Blog

Powered by WPeMatico