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;

Attachment: pgp8PfVDlnmst.pgp
Description: PGP signature

--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
  http://bestpractical.com/training

We're hiring! http://bestpractical.com/jobs

Reply via email to