Compartilhar via


SP.FieldCollection.getByInternalNameOrTitle(strName) Method

Applies to: SharePoint Foundation 2010

In this article
Return Value
Applies To
Remarks

Returns the first field object with the specified internal name or title from the collection.

var value = SP.FieldCollection.getByInternalNameOrTitle(strName);

Parameters

  • strName
    A string that specifies the internal name or title of the field.

Type: String

Return Value

Type: SP.Field

Applies To

SP.FieldCollection Class

Exceptions

  • SPException
    There is a COM exception that is not a throttle failure or a join throttle failure. Error code: -1.
  • ArgumentException
    The field with the specified internal name or title does not exist in the collection at the given scope. Error code: - 2147024809.

Remarks

The getByInternalNameOrTitle method searches first for an internal name, and then by title if an internal name is not found.

See Also

Reference

SP.FieldCollection Methods

SP.FieldCollection Properties

SP Namespace