Value Preference Dialog

From ADempiere ERP Wiki

Jump to: navigation, search

Table of Contents | Functionality | Value Preference Dialog | Window Size


The Value Preference Dialog provides a way to pre-set the value of a field when a new record is created. The preference can be set for that field for an individual or every

  • organization
  • user and
  • window

Contents

Access

Icon: Image:Icon_VPreference24.png
Pop-up menu: Image:Icon_VPreference24.png Value Preference

Restrictions

The Value Preference will appear if the "Preference Level" in the Role Window is set to something other than "None".

The Value Preference only appears in the pop-ups of the following field types:

Value preferences are set and overridden in the following order of precedence:

  1. Key/Parent/IsActive/SystemAccess
  2. SQL default
  3. Column default
  4. User preference
  5. System preference
  6. DataType defaults

Description

To set the Value Preference for a field, fill the field with the value and save the record. Then, right-click in the field to bring up the pop-up menu and select Value Preference. The Value Preference dialog will appear as shown below.

 

 

The title of the dialog will reflect the field it was called from. Two text fields will identify the field name (attribute) and the preference value (key). Below that are check boxes for the levels that the Value Preference will be set for:

  • Client - automatically selected and disabled. Other clients can not be affected.
  • Org - selecting this will limit the preference to this organization only. Deselecting will make the preference valid across all organizations for the client.
  • User/Contact - selecting will limit the preference to the current user. Deselecting will make the preference valid for all users.
  • Window - selecting will make limit the preference to the current window. Deselecting will make the preference valid for all windows that use that field.
Image:Note.gif Note:

Which check boxes are enabled depends on the "Preference Level" that is set in the Role Window. Basic users shouldn't be able to set preferences for everyone else and administrators may need to do so.

A line of text below the check boxes interprets the effect of the levels.

The dialog has three buttons:

  • Image:Icon_Delete24.png Delete - clicking this will delete any value preference that is set for this field
  • Image:Icon_Cancel24.png Cancel - clicking this will cancel the value preference
  • Image:Icon_Ok24.png Confirm - clicking this will deleted any existing value preference and save the new one.

To delete a value preference, click the Delete button or Confirm a null value in the field. The preference deleted will have the same Level settings as are selected in the dialog. Other preferences set with different settings will still exist.

Preference values can be overridden by certain system defaults, SQL settings and field default settings. See the Restriction section above. User preferences override system level preferences.


For Developers

The software that displays this window can be found in:

  • client/src
    • org.compiere.grid.ed.ValuePreference.java

The preferences are applied to fields in:

  • base/src
    • org.compiere.model.GridField.java
Personal tools