Welcome to Comunidade Bloggers |create|it| Sign in | Join | Help
Built-In ContentType and Field Ids

Only today that I've found that the WSS object model has 2 classes that hold all the IDs of the built-in ContentTypes and Fields.

Instead of doing things like this:

SPListItem item = list.Items.Add();

item["Title"] = "bla la bla";

You can do

item[SPBuiltInFieldId.Title] = "blab la bla";

For the fields you have SPBuiltInFieldId and for the content types SPBuiltInContentTypeId

:)

Posted: Thursday, October 04, 2007 1:17 PM by ricardo.costa
Filed under: ,

Comments

No Comments

Anonymous comments are disabled