/
user_set_preference ()

user_set_preference ()

Function prototype

user_set_preference(session, parameter, value, [scope = "USER"], [scope_ref]

API VersionAll

Sets a personal preference of the USER

Input

parameters:

  • session: is the session token obtained in the session_init() call
  • parameter: name of the preference.
  • valuevalue assigned to 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: This function does not return any value
  • 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_set_preference ( “LCAAAAAAAAAAAA”, "MY_PREF", "1", "PROGRAM", "323" );

Sets the value 1 to 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></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 create request the 'action' indicated

Related content