[Rt-devel] How to use the Attributes table?
Stephen Turner
sturner at MIT.EDU
Thu Dec 16 12:44:05 EST 2004
At Thursday 12/16/2004 09:42 AM, Todd Chapman wrote:
>Don't you need to associate the attribute with an ObjectId?
>
> > my $attr = new RT::Attribute($session{'CurrentUser'});
> > my @results = $attr->Create (Name => $Name, # Name of the
> atribute
> > Content
> => $Value, # Value you want to store
> > ContentType => $ValueType, #
> I used "String"
> > Object => $Object); #
> Object you want to attach the
> > attribute to (in my case a RT::User object)
> >
Well, with an object, strictly speaking - in my case I was attaching the
attribute to a user, so I passed in the RT::User object to the attribute's
Create method. Alternatively you could pass Object ID & Object Type to the
Create method.
Steve
More information about the Rt-devel
mailing list