Get list of dashboards

Hi all,

I’m trying to redirect the login page to the first dashboard in the
user’s home menu.

I’ve put the callback in autohandler/SuccessfulLogin and if i set
$dashid manually it redirects correctly.

I’ve tried two ways of getting the dashboard list copied from the
codebase in Elements/ShowDashboards or ElemantsListOfDashboards and
while the callback runs ok, clearly $dashboards does not contain any
dashboards!

cheers

<%INIT>
use RT::Dashboards;
#my $sys = RT::System->new( $session{‘CurrentUser’} );
#my $dashboards = RT::Dashboards->new( $RT::SystemUser );
#$dashboards->LimitToPrivacy(‘RT::System-’ . $sys->id);

my $dashboards=RT::Dashboards->new($session{‘CurrentUser’});
my $dashboard=$dashboards->Next;
my $dashid=$dashboard->Id;
#my $dashid=12;
$$RedirectTo="/Dashboards/$dashid";
</%INIT>
<%ARGS>
$RedirectTo => undef
</%ARGS>

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.

UK: 2B Habbo St, Greenwich, London
Dar es Salaam: 5 Ethan St, Mbezi beach
Arusha: 3 Ebeneezer Rd, Njiro
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 742 373 327
Skype: woody1tz
http://wildthingsafaris.com