/
user_get_preference ()

user_get_preference ()

Function prototype

user_get_preference(session, parameter, [scope = "USER"], [scope_ref])

API VersionAll

Returns the value of a personal preference of the USER

Input

parameters:

  • session: is the session token obtained in the session_init() call
  • parameter: name of the preference.
  • scopedefines in which scope the preference is used. Possible values are:
    • “USER”: Preference assigned to the USER

    • “PROGRAM”: Preference that is applicable only in the context of a PROGRAM TEMPLATE OBJECT.

    • “APPLICATION”: Preference stored by an client application. For example it may be used to store preferences of the user about how to sort tables, colors of the interface, or any other setting that may affect the behavior of the client application

  • scope_refWhen the scope is different than “USER”, it is necessary to indicate the reference of the scope. For example, when defining a preference of a PROGRAM, then it is necessary to indicate the reference of the PROGRAM.

Output

parameters:

  • result: value of the preference
  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language
  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request

sample:

user_get_preference ( “LCAAAAAAAAAAAA”, "MY_PREF", "PROGRAM", "323" );

Returns the value of the preference named MY_PREF, which used in the PROGRAM with reference 323

Response

sample:


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<result>1</result>
<ErrorMsg></ErrorMsg>
<ErrorCode></ErrorCode>

Notes:


Return Error codes

ERROR CODE

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to get the requested preference

Related content