ERP/2.50/Developers Guide/Database Model/org.openbravo.model.ad.domain/AD Preference
AD_Preference
Defines preferences (default values) for a user.
- Name:ADPreference
- Classname:Preference
This table contains the following columns:
Name | Nullable | Data Type | Description |
AD_Preference_ID | N | VARCHAR2(32) | Personal Preference |
AD_Client_ID | N | VARCHAR2(32) | Client for this installation. |
AD_Org_ID | N | VARCHAR2(32) | Organizational entity within client |
IsActive | N | CHAR(1) | A flag indicating whether this record is available for use or de-activated. |
Created | N | DATE | The date that this record is completed. |
CreatedBy | N | VARCHAR2(32) | User who created this records |
Updated | N | DATE | x not implemented |
UpdatedBy | N | VARCHAR2(32) | User who updated this records |
AD_Window_ID | Y | VARCHAR2(32) | A work area which can be used to create, view, edit, and process a record. |
AD_User_ID | Y | VARCHAR2(32) | An acquaintance to reach for information related to the business partner. |
Attribute | Y | NVARCHAR2(60) | Name of the preference. |
Value | Y | CLOB(4000) | Value assigned to the property |
Property | Y | VARCHAR2(60) | Configuration Property to assign value |
IsPropertyList | N | CHAR(1) | Determines how the preference is defined: by Property or by Attribute. |
VisibleAt_Client_ID | Y | VARCHAR2(32) | Defines Client visibility. |
VisibleAt_Org_ID | Y | VARCHAR2(32) | Defines Organization visibility. |
VisibleAt_Role_ID | Y | VARCHAR2(32) | Defines Role visibility. |
Selected | N | CHAR(1) | Selected property in case of conflict |
AD_Module_ID | Y | VARCHAR2(32) | Module |
Other Info
Check constraints
These are the check constraints for this table:
- AD_PREFERENCE_ISACTIVE_CHECK: ISACTIVE IN ('Y', 'N')
- AD_PREFERENCE_LIST_CHECK: (((ISPROPERTYLIST = 'Y') AND (PROPERTY IS NOT NULL)) AND (ATTRIBUTE IS NULL)) OR (((ISPROPERTYLIST = 'N') AND (ATTRIBUTE IS NOT NULL)) AND (PROPERTY IS NULL))
- AD_PREFERENCE_SELECTED_CHECK: SELECTED IN ('Y', 'N')
Indexes
These are the indexes for this table (for each index there is a list of all the columns included within it):
Unique
- AD_PREFERENCE_KEY
Columns
Preference
Personal Preference, a default value that will be used by a user.
- Physical column name: AD_Preference_ID
- Property Name: id
- Reference: ID
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
- Default value: @AD_CLIENT_ID@
Foreign key column to AD_Client table, (column: AD_Client_ID)
Validation Rule AD_Client Security validation: Clients with user access rights. With the following code:
AD_Client.AD_Client_ID IN (@#User_Client@)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
- Default value: @AD_Org_ID@
Foreign key column to AD_Org table, (column: AD_Org_ID)
Active
There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:
(1) The system requires the record for auditing purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.
- Physical column name: IsActive
- Property Name: active
- Reference: YesNo
- Default value: Y
Creation Date
The Created field indicates the date that this record was created.
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
Created By
- Physical column name: CreatedBy
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Updated
The Updated field indicates the date that this record was updated.
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
Updated By
- Physical column name: UpdatedBy
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Window
- Physical column name: AD_Window_ID
- Property Name: window
- Reference: TableDir
Foreign key column to AD_Window table, (column: AD_Window_ID)
Visible at User
The User identifies a unique user in the system. This could be an internal user or a business partner contact
- Physical column name: AD_User_ID
- Property Name: userContact
- Reference: TableDir
Foreign key column to AD_User table, (column: AD_User_ID)
Attribute
It is the name of a preference to assign a value. It is a free text name, as opposite as Property which is a selectable value from a list.
- Physical column name: Attribute
- Property Name: attribute
- Reference: String
- This column is part of the table's identifier
Value
It is the actual value that is assigned to the property at the defined level.
- Physical column name: Value
- Property Name: searchKey
- Reference: Text
Property
It is the "Configuration Property" this record sets value to.
Configuration Properties are defined by modules with the purpose other modules are capable to assign them values.
- Physical column name: Property
- Property Name: property
- Reference: List
- This column is part of the table's identifier
List values: Property Configuration
The allowed values for this list are:
- CCU (Implements customer Credit Used calculation): Avoid the C_BP_SOCREDITUSED_REFRESH function calculation.
- FinancialManagement (Implements an alternative Financial Management)
- ForcedLoginURL (Forced Login URL): If this property is set and the Openbravo login page is accessed using a different URL, it will be redirected to this one. Value for this property should be assigned at system level.
- InvoiceProcessButton (Implements an alternative Invoice Process button): This only affects the process button on Purchase and Sales invoice windows. All other processes that complete invoices will still use the c_invoice_post procedure.
- PaymentMonitor (Implements Payment Monitor management): Disables core's background process and button on invoice's header that manage the Payment Monitor
- PaymentPriority (Implements Payment Priority): Implements Payment Priority feature
- SecuredProcess (Secured Process): Generated UI processes called from buttons within tabs can be secured by setting this property to 'Y'. If this property is not set, they can be executed without giving explicit access by all roles with access to that window.
- StartPage (Startpage of the user ): The page to which the user is redirected after logging in.
- isUpgrading (Upgrading from 2.50): The instance is in the process of upgrade from 2.50
Property List
When this field is checked, the preference is defined by Property which is a selectable value from a drop down list. Properties are defined by modules.
In case the field is not checked, the preference is defined by Attribute, which is a free text name.
- Physical column name: IsPropertyList
- Property Name: propertyList
- Reference: YesNo
- Default value: Y
Visible at Client
- Physical column name: VisibleAt_Client_ID
- Property Name: visibleAtClient
- Reference: Table
Foreign key column to AD_Client table, (column: AD_Client_ID)
Reference Table AD_Client
Visible at Organization
- Physical column name: VisibleAt_Org_ID
- Property Name: visibleAtOrganization
- Reference: Table
Foreign key column to AD_Org table, (column: AD_Org_ID)
Reference Table AD_Org (all)
Visible at Role
- Physical column name: VisibleAt_Role_ID
- Property Name: visibleAtRole
- Reference: Table
Foreign key column to AD_Role table, (column: AD_Role_ID)
Reference Table AD_Role
Selected
In case of conflict (multiple values for a single property), this field must be checked for one of them in order to pick this one over the rest.
- Physical column name: Selected
- Property Name: selected
- Reference: YesNo
- Default value: N
Callout: SL_Preference
This element is linked to a callout.
Checks there is only one selected preference for the current visibility.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Preference Java class.
Module
- Physical column name: AD_Module_ID
- Property Name: module
- Reference: TableDir
Foreign key column to AD_Module table, (column: AD_Module_ID)
Validation Rule Ad_Module_ID IsInDevelopment: AD_Module_ID IsInDevelopment. With the following code:
IsInDevelopment = 'Y' AND type != 'T'