Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a List where one of its field is based on the People Editor control. The field name is Organizer. How do I get the value if this field using SPlinq. When I iterate thru the list item in debug mode, I can see that the OrganizerImnName has a value. And in the intellisense of the SPLinq I can see this two attributes, OrganizerId and OrganizerImnName. When I try to get the value Like this

var results = from o in dc.GetList<OrganizerItem>("Organizer")
select new { Organizer =  o.OrganizerImnName };

I get this error The query uses unsupported elements, such as references to more than one list, or the projection of a complete entity by using EntityRef/EntitySet.

share|improve this question

1 Answer 1

This error means that o.OrganizerImnName (sp?) is a complex type, so you need to specify a property of that value, such as Title. Use Intellisense to see what properties are available.

You could also try: select new { Organizer = o.OrganizerItem.Title };

share|improve this answer
    
Thanks Laurie. .ToList() solved my problem. You can find more here xpressivecode.com/blog/post/2011/04/19/… –  Agamand The True May 27 '11 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.