Understanding the Preference Service (API 1.3.1 and EnterpriseOne Tools 9.2.0.2)

The preference service enables an AIS client to save and retrieve user-level information that is stored by user, role, or *PUBLIC in the User Overrides Table (F98950) in EnterpriseOne.

The keys to the information are the Type (UOTY), User ID (USER), Sequence (SEQ) and Object Name (OBNM). The data is a string and is stored in the blob column BINDTA. All preference records are written with Type=PS.

Starting with AIS Client Java API 1.4.2 and EnterpriseOne Tools 9.2.1, the following four additional key fields allow for more distinct records: Form Name (FMNM), DelimitedControlIDs (IDLST), Version (VERS), and Language (LNGP). See Example - Preference Service Java API for a code example with these fields.

The AIS Client Java API enables you to save a serialized HashMap of data to this table using the methods in the PreferencesService object. For the get operation, the data is de-serialized to a HashMap and returned.

It is important to note that the data is stored as serialized values. For example, a Date object will be stored as the Long time, and you must convert it back to a date after the response is returned.

If a client application has multiple sets of data that need to be saved separately, a sequence field is available as a key. If you do not specify a sequence, the default sequence is zero.

Set and put actions are performed on behalf of the logged in user, established with the LoginEnvironment. All records for the users are stored in the USER column. You can use the User Overrides application (P98950) in EnterpriseOne to manage the records in the User Overrides Table (F98950). In P98950, you can copy records to different roles including *PUBLIC. The record will be retrieved from P98950 based on the user, role, or *PUBLIC hierarchy.