Tag Archives: fieldconstant

SharePoint field constants.

I always forget the name of the class that stores a great big list of field ID constants. So as a reminder to myself it’s SPBuildInFieldId

For example:


SPFieldUserValue user = item[SPBuiltInFieldId.Author]

Whilst looking this up again I stumbled across another similar class SPBuiltInContentTypeId that holds content type id’s for the common OOTB content types, neat!

if (this.ContentTypeId.IsChildOf(SPBuiltInContentTypeId.Message))
{
......
}
Advertisements
Tagged , , , , ,