[rt-users] Fw: [rt-devel] Create a CustomField and Apply it Globally
Kevin Falcone
falcone at bestpractical.com
Wed Oct 24 23:28:44 EDT 2012
On Wed, Oct 24, 2012 at 05:09:44AM -0700, Red Pantyhose wrote:
>
> because I'm unable to understand how to deal with
>
> RT::CustomField->ApplyGlobally
Check the docs for ApplyGlobally:
http://bestpractical.com/rt/docs/latest/RT/CustomField.html#ApplyGlobally
It does not apply a custom field globally, it tells you about the CF.
I suspect you want
http://bestpractical.com/rt/docs/latest/RT/CustomField.html#AddToObject-OBJECT
and to look at how share/html/Admin/CustomFields/Objects.html does it
-kevin
> Thanks sincerely,
>
> # --- MY CODE ---#
>
> my $cf = RT::CustomField->new( RT::SystemUser );
>
> my ( $cf_val, $cf_msg ) = $cf->Create(
> Name => 'NAME_FROM_DB',
> TypeComposite => 'Freeform-1',
> LookupType => 'RT::Queue-RT::Ticket',
> Description => 'DESCRIPTION_RETRIVED_FROM_DB',
> Pattern => '',
> LinkValueTo => '',
> IncludeContentForValue => '',
> BasedOn => '',
> Disabled => 0,
> );
>
> # Please help me here ????
> $cf = RT::CustomField->new( RT::SystemUser );
> $cf->Load( Id => $cf_val );
> $cf->ApplyGlobally;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20121024/17bcce6d/attachment.sig>
More information about the rt-users
mailing list