[rt-devel] Getting Custom Fields for a User
Lee Wilson
leefm40 at yahoo.co.uk
Sun Apr 15 14:59:45 EDT 2012
Good Evening,
I'm trying to obtain the list of custom fields for the current user so that I can take certain decisions based on these values.
I've had a look at the code in 'Admin/Elements/EditCustomFields' and adapted (I think) accordingly but it's not returning any values:
I'd appreciate any assistance that you can offer.
Here's the code of put into 'local/html/Callbacks/MyCallbacks/Ticket/Elements/EditCustomFields/MassageCustomFields'
---
<%$session{'CurrentUser'}->RealName%>
% while (my $CustomFieldObj = $CustomFields->Next) {
<% $CustomFieldObj->id %><% $CustomFieldObj->Name %><br />
%}
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
$CustomFields->UnLimit;
$CustomFields->LimitToLookupType( $LookupType ) if $LookupType;
</%INIT>
<%ARGS>
$LookupType => 'RT::Queue-RT::User'
</%ARGS>
---
Thanks in advance
Lee
More information about the rt-devel
mailing list