[rt-devel] Create a CustomField and Apply it Globally

Red Pantyhose redpantyhose at yahoo.com
Wed Oct 24 07:51:11 EDT 2012


Dear RT-Developpers

I have a problem applying a CustomField in a Scrip I created.

I like to create dynamically create CustomFields and Apply them Globally.

The RT::CustomField->Cerate() Code below works ...

But I have to ApplyGlobally manually via : 

$WebURL/rt/Admin/CustomFields/Objects.html

because I'm unable to understand how to deal with 

RT::CustomField->ApplyGlobally

Can you send me an Example how to deal with ApplyGlobally ?

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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20121024/3018199f/attachment.html>


More information about the rt-devel mailing list