- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
  - LimitToLookupType
  - LimitToChildType
  - LimitToParentType
  - LimitToObjectId
  - LimitToGlobalOrObjectId
  - LimitToNotApplied
  - LimitToApplied
  - LimitToGlobalOrQueue QUEUEID
  - LimitToQueue QUEUEID
  - LimitToGlobal
  - ApplySortOrder
  - ContextObject
  - SetContextObject
  - Next
  - NewItem

# NAME

      RT::CustomFields - a collection of RT CustomField objects

# SYNOPSIS

      use RT::CustomFields;

# DESCRIPTION

# METHODS

## LimitToLookupType

Takes LookupType and limits collection.

## LimitToChildType

Takes partial LookupType and limits collection to records where LookupType is equal or ends with the value.

## LimitToParentType

Takes partial LookupType and limits collection to records where LookupType is equal or starts with the value.

## LimitToObjectId

Takes an ObjectId and limits the collection to CFs applied to said object.

When called multiple times the ObjectId limits are joined with OR.

## LimitToGlobalOrObjectId

Takes list of object IDs and limits collection to custom fields that are applied to these objects or globally.

## LimitToNotApplied

Takes either list of object ids or nothing. Limits collection to custom fields to listed objects or any corespondingly. Use zero to mean global.

## LimitToApplied

Limits collection to custom fields to listed objects or any corespondingly. Use zero to mean global.

## LimitToGlobalOrQueue QUEUEID

DEPRECATED since CFs are applicable not only to tickets these days.

Limits the set of custom fields found to global custom fields or those tied to the queue with ID QUEUEID

## LimitToQueue QUEUEID

DEPRECATED since CFs are applicable not only to tickets these days.

Takes a queue id (numerical) as its only argument. Makes sure that Scopes it pulls out apply to this queue (or another that you've selected with another call to this method

## LimitToGlobal

DEPRECATED since CFs are applicable not only to tickets these days.

Makes sure that Scopes it pulls out apply to all queues (or another that you've selected with another call to this method or LimitToQueue)

## ApplySortOrder

Sort custom fields according to thier order application to objects. It's expected that collection contains only records of one "LookupType" in RT::CustomField and applied to one object or globally ("LimitToGlobalOrObjectId"), otherwise sorting makes no sense.

## ContextObject

Returns context object for this collection of custom fields, but only if it's defined.

## SetContextObject

Sets context object for this collection of custom fields.

## Next

Returns the next custom field that this user can see.

## NewItem

Returns an empty new RT::CustomField item Overrides <RT::SearchBuilder/NewItem> to make sure </ContextObject> is inherited.

← Back to index