IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side APIWL.Client.setUserPref
Asynchronous function that creates a user preference, or updates the value of an existing user preference...
WL.Client.setUserPref(key, value, options)
If a user preference with the specified user key is already defined, the user preference value is updated.
If there is no user preference defined with the specified key, a new user preference is created with the specified key and value. However, if there are already 100 preferences, no preference is created, and the failure handler of the method is called.
The local user preferences in the application are updated only when a successful response is received from the server.
Parameter Description key The user preference key. Can be up to 128 characters long. value The value of the user preference. Can be up to 3072 characters long. options Optional. A standard options object.
Return Value
None.
Parent JavaScript client-side API