Hi
I was trying below mentioned code and it is not running the if block. My table cntains "Enddate" attribute but it is still not working. Please help me
Entity Recordtoupdate = new Entity("tpamm_membership");
Recordtoupdate.Id = ((EntityReference)entity["tpamm_membership"]).Id;
Recordtoupdate["tpamm_status"] = new OptionSetValue(239730001);
Recordtoupdate["statuscode"] = new OptionSetValue(1);
service.Update(Recordtoupdate);
if (Recordtoupdate.Attributes.Contains("tpamm_enddate"))
{
Recordtoupdate["tpamm_membershipsince"] = DateTime.Today;
Recordtoupdate["tpamm_startdate"] = DateTime.Today;
}






