Ive searched but cant seem to find any answer to this and its driving me nuts now. All I want to do is order my newsitem list by a custom field called ArticleDate, this is a DateTime which was necessary so they could be ordered in a specific way. I have found some example that nearly get there but I am getting errors.
I am attempting to use
.OrderByDescending(i => i.GetValue<
but am getting the following error :
Database mapped field uses different type 'System.Nullable`1[[System.DateTime, mscorlib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
Parameter name: methodCallExpression
Actual value was i.FieldValue("ArticleDate").
if I dont sepcify <DateTime> then I get this error:
NonGeneric method 'object GetValue(string fieldName)' is not supported in LINQ queries. Use generic 'TValue GetValue<
>(string fieldName)' instead.
Is it possible to sort on a custom field in a newsitem ?