SPMetal is a very useful tool in Sharepoint 2010, introduced by Microsoft for creating Entity Data Model of the underlying Sharepoint lists. Though it is still at a very nascent stage, it can still be very productive as far as sharepoint customization in .Net is concerned.

learn more… | top users | synonyms

0
votes
1answer
44 views

get list item versions in linq to sharepoint

How can i access last approved list-items in linq to sharepoint. Actually I want equivalent of this statement in linq to sharepoint if (item.Versions[index].Level == SPFileLevel.Published)
0
votes
1answer
40 views

SPMetal generating unique enums for each choice field with same values

I use SPMetal on two lists on my SharePoint site and there are several columns with choice field who have the same choices. <Field Name='Colors1' Type='Choice'> <CHOICES> ...
0
votes
1answer
178 views

Why would linq to sharepoint ever return null list items?

I am getting a null reference exception that I can't pin down. By process of elimination using a variety of assumptions I've narrowed it down to a single variable, a linq iteration variable, like so: ...
0
votes
1answer
410 views

SPMetal, lookups without EntityRef

I defined site definition with two content types and two list definitions. I have lookup site column <Field ID="{4318c52f-11c6-129a-b832-5ab22450b17c}" Type="Lookup" ...
0
votes
1answer
349 views

SPMetal Person column generation

I'm using SPMetal to generate a class for my lists to use in a Sandbox-solution (with Sandbox Visual WebParts). However, when I generate the classes for a list column of type "Person or Group" with ...
2
votes
0answers
202 views

Resource throttling and LINQ / spmetal

Today I received an e-mail from a customer telling me their site broke. I checked the ULS and noticed resource throttling had kicked in on one of the sites. I'm used to this when using ...
1
vote
0answers
27 views

spmetal generates code for all sharepoint lists except one

I used SPMetal to generate code for the lists on my SharePoint site as per these instructions. I have several custom lists on the site. SPMetal generates code for all of the lists except one. There is ...
1
vote
0answers
221 views

My List Content Type is no being found by SPMetal

I am trying to use Linq to Sharepoint for some custom reports but I am running into an issue trying to setup SPMetal. I generated the class but for one of my lists "ListA" only ID and Title fields ...
1
vote
0answers
162 views

Auto inserting SPMetal child entities?

Let's say I have two lists in my web site, linked by a lookup : List A (content type ACT) Title (text) List B (content type BCT) Title (text) A (lookup to A) I use SPMetal to generate a ...
1
vote
0answers
166 views

Generating Entity List property for “Reusable Content” list

I am attempting to generate an entity class for "Reusable Content" list. After running the CKSDEV tool, i see that DataContext object has the following /// <summary> /// Items in this list ...
1
vote
0answers
236 views

Getting at InfoPath/form library data using LINQ to SharePoint

I'm teaching myself some basic SharePoint stuff, coming from three-tier ASP.NET, and before that, Java background. I've been trying to figure out how to do things "the SharePoint" way, rather than ...
1
vote
0answers
515 views

Why does SPMetal ignore lookup columns in Farm Solution

I have content types and related lists (via lookup columns) in a Sandbox solution(.wsp). All my lookup column relationships come up fine in the SPMetal generated entity classes. I now have a ...
0
votes
0answers
26 views

Complete the task programmatically but workflow don't forward to next state

I complete my task through code because I am handling my task request through my custom task form. I am using Spmetal(SharePoint.Linq) to complete task, but strange, my workflow is not moving to its ...
0
votes
0answers
261 views

SPMetal insert item with lookup column throwing exception stating that there is a field that is read only

I have the following code protected void BetOnCar_Click(object sender, EventArgs e) { DerbyDataContext context = new DerbyDataContext(SPContext.Current.Web.Url); int carId = ...