/
case_set_preference ()

case_set_preference ()

Function prototype

case_set_preference(session, case, parameter, value, [scope = "USER"], [scope_ref])

API Version

2.7.20 and higher

Sets the value of a specific preference of a CASE.

This operation is only allowed if the active session user has privileges to view the profile of the CASE

Input parameters:

  • session: is the session token obtained in the session_init ()  call

  • parameter: name of the preference.

  • value: value to assign to the preference

  • scope: defines 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 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_ref: When 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:

case_set_preference ( “LCAAAAAAAAAAAA”, 21253, "MY_PREF", “new value”, "PROGRAM", "323" );

Response sample:

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





Return Error codes

ERROR CODE



ERROR CODE



INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to modify the preferences of the CASE

CASE.NOT_FOUND

The specified CASE was not found



Related content