I'm retrieving a custom entity using the latest SDK with a linq statement.
I'm using early binding and my XrmServiceContent was created with the crmsvcutil program.
I'm attempting to retrieve all of my inactive custom entities:
var test = xrm.dt_jobsiteSet.Where(j => j.statecode == 1).Select(j => new { Name = j.dt_jobsiteprojectname, StateCode = j.statecode}).ToList();
var test1 = xrm.dt_jobsiteSet.Where(j => j.statuscode == 2).Select(j => new { Name = j.dt_jobsiteprojectname, StatusCode = j.statuscode}).ToList();
test & test1 returns the correct results, but the StateCode & StatusCode values are all null.
Do these attributes need to be "converted"? I'm sure it's something basic - just need another set of eyes to identify my problem!
TIA - Bob