RT::CustomFields - a collection of RT CustomField objects
use RT::CustomFields;
Limits this collection object to custom fields which appear under a specified grouping by calling "Limit" for each CF name as appropriate.
Requires an RT::Record object or class name as the first argument and accepts a grouping name as the second. If the grouping name is false (usually via the empty string), limits to custom fields which appear in no grouping.
Caveat: While the record object or class name is used to find the available groupings, no automatic limit is placed on the lookup type of the custom fields. It's highly suggested you limit the collection by queue or another lookup type first. This is already done for you if you're creating the collection via the "CustomFields" method on an RT::Record object.
Takes LookupType and limits collection.
Takes partial LookupType and limits collection to records where LookupType is equal or ends with the value.
Takes partial LookupType and limits collection to records where LookupType is equal or starts with the value.
Takes an ObjectId and limits the collection to CFs applied to said object.
When called multiple times the ObjectId limits are joined with OR.
Takes list of object IDs and limits collection to custom fields that are added to these objects or globally.
Takes either list of object ids or nothing. Limits collection to custom fields to listed objects or any corespondingly. Use zero to mean global.
Limits collection to custom fields to listed objects or any corespondingly. Use zero to mean global.
Limits the set of custom fields found to global custom fields or those tied to the queue QUEUEID
, similar to "LimitToGlobalOrObjectId".
Note that this will cause the collection to only return ticket CFs.
Takes a numeric QUEUEID
, and limits the Custom Field collection to those only applied directly to it; this limit is OR'd with other "LimitToQueue" and "LimitToGlobal" limits.
Note that this will cause the collection to only return ticket CFs.
Limits the Custom Field collection to global ticket CFs; this limit is OR'd with "LimitToQueue" limits.
Note that this will cause the collection to only return ticket CFs.
Limits the Custom Field collection to ones of which types support default values.
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.
Returns context object for this collection of custom fields, but only if it's defined.
Sets context object for this collection of custom fields.
Overrides the collection to ensure that only custom fields the user can see are returned; also propagates down the "ContextObject".
Returns an empty new RT::CustomField item Overrides <RT::SearchBuilder/NewItem> to make sure </ContextObject> is inherited.
Takes a numeric RT::Catalog ID. Limits the RT::CustomFields collection to only those fields applied directly to the specified catalog. This limit is OR'd with other "LimitToCatalog" and "LimitToObjectId" in RT::CustomFields calls.
Note that this will cause the collection to only return asset CFs.
← Back to index