RT 4.0.24 Documentation

This version has reached its end of life and is out of support. Please contact us for upgrade assistance.

RT::CustomFields

Go to latest version →

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.

AddRecord

Overrides the collection to ensure that only custom fields the user can see are returned; also propagates down the "ContextObject".

NewItem

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

← Back to index