Getting Dynamic Agent Prefences

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

Getting Dynamic Agent Prefences

Post by ahauser »

Hi,

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 ?

Regards
Alexis
skullz
Znuny superhero
Posts: 617
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

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