[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-devel
Subject: [rt-devel] Create a CustomField and Apply it Globally
From: Red Pantyhose <redpantyhose () yahoo ! com>
Date: 2012-10-24 11:51:11
Message-ID: 1351079471.40754.YahooMailNeo () web163404 ! mail ! gq1 ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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;
[Attachment #5 (text/html)]
<html><body><div style="color:#000; background-color:#fff; font-family:arial, \
helvetica, sans-serif;font-size:12pt">Dear RT-Developpers<br><br>I have a problem \
applying a CustomField in a Scrip I created.<br><br>I like to create dynamically \
create CustomFields and Apply them Globally.<br><br>The RT::CustomField->Cerate() \
Code below works ...<br><br>But I have to ApplyGlobally manually via : \
<br><br>$WebURL/rt/Admin/CustomFields/Objects.html<br><br>because I'm unable to \
understand how to deal with <br><br>RT::CustomField->ApplyGlobally<br><br>Can you \
send me an Example how to deal with ApplyGlobally ?<br><br>Thanks \
sincerely,<br><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></div></body></html>
--------
Final RT training for 2012 in Atlanta, GA - October 23 & 24
http://bestpractical.com/training
We're hiring! http://bestpractical.com/jobs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic