Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SPFieldCollection.AddFieldAsXml method (String, Boolean, SPAddFieldOptions)

Creates a field based on the specified schema, Boolean value, and field options.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public string AddFieldAsXml(
	string schemaXml,
	bool addToDefaultView,
	SPAddFieldOptions op
)

Parameters

schemaXml
Type: System.String

A Collaborative Application Markup Language (CAML) string that contains the schema.

addToDefaultView
Type: System.Boolean

true if field is added to the default list view; otherwise, false.

op
Type: Microsoft.SharePoint.SPAddFieldOptions

An SPAddFieldOptions value that specifies the field options.

Return value

Type: System.String
A string that contains the name of the new field.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.