IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API

WL.Client.setUserPrefs

Asynchronous function that creates one or more new user preferences, updates the values of one or more existing user preferences, or both.

For each user preference key and value pair provided, the following occurs:

If adding the new user preferences would result in the number of user preferences exceeding 100, then no user preferences are added or updated, 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
{key1:value1, key2:value2, …} A hash object that contains user preference key and value pairs. The key can be up to 128 characters long. The value can be up to 3072 characters long.
options Optional. A standard options object.


Return Value

None.


Parent JavaScript client-side API