Getting Dynamic Agent Prefences

English! place to talk about development, programming and coding
Post Reply
Znuny newbie
Posts: 11
Joined: 19 May 2017, 10:09
Znuny / OTRS Version: ITSM5S

Getting Dynamic Agent Prefences

Post by ahauser »


I'm using some custom agent prefences using a XML file like PreferencesGroup###MyPreference
It appears in the agent prerences interface with a field, corresponding to the key called "Key".

I would like to get this preference, and change some interface elements depending on that preference.

I foundout it was possible to access the value from the XML using :

Code: Select all

$Self->{Test} = $ConfigObject->Get('PreferencesGroups')->{MyPreference}->{Key};
However, when the agent changes its value, it's not fetched using this method.

What would be the simplest way to get its dynamic value ?
Is there a specific AJAX call for that ?

Znuny wizard
Posts: 465
Joined: 24 Feb 2012, 03:58
Znuny / OTRS Version: OTRS LTS
Real Name: Mo Azfar
Location: Kuala Lumpur, MY

Re: Getting Dynamic Agent Prefences

Post by skullz »

Code: Select all

 my $UserObject = $Kernel::OM->Get('Kernel::System::User');
 my %Preferences = $UserObject->GetPreferences(
        UserID => $Param{UserID}, #id of the user who performed the action
good luck
Post Reply