Blog Stats
  • Posts - 160
  • Articles - 0
  • Comments - 48
  • Trackbacks - 3

 

Accessing Built In SharePoint fields

When you’re accessing built in SharePoint fields (such as Title) from code, do you go:

	listItem["Title"] = xVar;
	listItem[0] = xVar;

Don’t! Have a look at SPBuiltInFieldId that keeps tracks of the Id’s for the built in fields for you:

	string title = myListItem[SPBuiltInFieldIds.Title];


Feedback

No comments posted yet.


Post a comment





 

Please add 1 and 1 and type the answer here:

 

 

Copyright © Niklas Nihlen