[rt-users] Custom Fields for Users
Rob Scheibel
robscheibel at gmail.com
Tue Oct 18 19:01:47 EDT 2005
I've throughly searched the Wiki and the old archives and can not come up
with an answer to this question, so perhaps some of you may be able to help:
I would like to get the CustomField Named "DefaultQueue" that I created for
Users in the SelectQueue file so that when the Queue list appears, it would
default to a certain Queue for each user. Here is the code that I have come
up with that should work, but I keep
getting undefines and what-not. Perhaps you can help?
% my $user = new RT::User($session{'CurrentUser'});
% my $cfs = $user->CustomFields();
% while($cf = $cfs->Next) {
% if ($cf->Name eq 'DefaultQueue') {
% my $cfvalues = $user->CustomFieldValues($cf->Id);
% while(my $cfvalue = $cfvalues->Next) {
% print $cfvalue->Content; }}}
Obviously the last print line would be changed, but I'm using it just for
testing purposes right now until it's working.
Let me know if you need any more details. I'll also keep looking around for
an answer, but do appreciate any and all help.
Thanks!
-rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20051018/efd65aac/attachment.htm>
More information about the rt-users
mailing list