<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span></span></div><div><span>Thanks</span></div><div><br><span></span></div><div><span></span>AddToObject solved my Problem ;)<br></div><div> </div><br><div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Kevin Falcone <falcone@bestpractical.com><br> <b><span style="font-weight: bold;">To:</span></b> rt-users@lists.bestpractical.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, October 25, 2012 5:28 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [rt-users] Fw: [rt-devel] Create a CustomField and Apply it Globally<br> </font> </div> <br>
On Wed, Oct 24, 2012 at 05:09:44AM -0700, Red Pantyhose wrote:<br>> <br>>    because I'm unable to understand how to deal with<br>> <br>>    RT::CustomField->ApplyGlobally<br><br>Check the docs for ApplyGlobally:<br>http://bestpractical.com/rt/docs/latest/RT/CustomField.html#ApplyGlobally<br>It does not apply a custom field globally, it tells you about the CF.<br><br>I suspect you want<br>http://bestpractical.com/rt/docs/latest/RT/CustomField.html#AddToObject-OBJECT<br>and to look at how share/html/Admin/CustomFields/Objects.html does it<br><br>-kevin<br><br>>    Thanks sincerely,<br>> <br>>    # --- MY CODE ---#<br>> <br>>    my $cf = RT::CustomField->new( RT::SystemUser );<br>> <br>>    my ( $cf_val, $cf_msg ) = $cf->Create(<br>>                Name          =>
 'NAME_FROM_DB',<br>>                TypeComposite => 'Freeform-1',<br>>                LookupType    => 'RT::Queue-RT::Ticket',<br>>                Description   => 'DESCRIPTION_RETRIVED_FROM_DB',<br>>                Pattern       => '',<br>>                LinkValueTo   => '',<br>>                IncludeContentForValue => '',<br>>                BasedOn       => '',<br>>                Disabled      => 0,<br>>    );<br>> <br>>    # Please help me here ????<br>>    $cf =
 RT::CustomField->new( RT::SystemUser );<br>>    $cf->Load( Id => $cf_val );<br>>    $cf->ApplyGlobally;<br><br><br>--------<br>Final RT training for 2012 in Atlanta, GA - October 23 & 24<br>  <a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br><br>We're hiring! <a href="http://bestpractical.com/jobs" target="_blank">http://bestpractical.com/jobs</a><br><br><br> </div> </div>  </div></div></body></html>