NF12 Record attributes For Decluttering Configuration
NOTE: This is not yet integrated into core
Feature: Decluttered Configuration / Attributes on Record
Goal: Security
Developer: Logilite Technologies
Goal
In Application dictionary object like Tab, Table or Column, if we have to add any configuration which are rarely have value, then we keep adding columns on relevent tables. where hardly non null value specified on few records but most of record has no value. This makes even table bulky having hundreds of columns. Also custom plugins needs to add additional property on AD tables and it makes table bulky. Purpose of this features is to enable managing table specific attributes in Entity-Attribute-Value (EAV) model.
As attribute set design in iDempiere is EAV model, This enhancement reusing concept of EAV. Below steps shows a sample configurations.
Step for Decluttered Configuration
Create an Attribute for IsSingleRow
and MaxQueryRecords
- Navigate to Attribute window in iDempiere.
- Click on New Record.
- Fill in the details for the
IsSingleRow
attribute:- Name:
IsSingleRow
- Reference: Select the appropriate reference (e.g.,
YesNo
).
- Name:
- Save the record.
- Repeat the above steps to create another attribute for
MaxQueryRecords
:- Name:
MaxQueryRecords
- Reference:
Number
- Name:
- Save the record.
Create an Attribute Set for AD_Tab
- Go to the Attribute Set window.
- Click on New Record.
- Fill in the details:
- Name:
Tab Attribute Set
- Attribute Set Type: Choose
Table Attribute
.
- Name:
- Save the record.
Add IsSingleRow
and MaxQueryRecords
to the Attribute Set
- While in the Attribute Set window, navigate to the Attribute tab.
- Click on New Record to add the
IsSingleRow
attribute. - Select the
IsSingleRow
attribute from the dropdown. - Save the record.
- Repeat the process to add
MaxQueryRecords
to the same attribute set.
Link the Attribute Set to the AD_Tab
Table
- Go to the Table and Column window.
- Search for the
AD_Tab
table. - In the Table tab, set the Attribute Set to
Tab Attribute Set
(the one created earlier). - Save the record.
Add Attribute Values for a Specific Tab
- In the Menu, navigate to Application Dictionary > Window, Tab & Field.
- In the Window, Tab & Field window, use the search functionality to locate the Product window.
- Locate the Product tab within the Product window records.
- With the Product tab selected, locate and click the Toolbar Attribute button. This button opens the Product Attribute Info form, allowing you to set specific attributes.
- Once the Product Attribute Info form opens, you'll see a list of attributes linked to the Tab Attribute Set (such as
IsSingleRow
andMaxQueryRecords
if already defined).- Set the desired value: IsSingleRow: Set it to
- Checked means
Y
(Yes). - Unchecked means
N
(No).
- Checked means
- MaxQueryRecords: Set its value (e.g.,
100
)
- Set the desired value: IsSingleRow: Set it to
- After setting the values for IsSingleRow (checkbox) and MaxQueryRecords, click the OK button in the Product Attribute Info form to save the changes.
Note that if System Element or Message for IsSingleRow is defined then it brings label using that system element.
In code, Attributes can be pulled using PO object like below.
MTab.get(getAD_Tab_ID()).getAttributeAsBoolean("IsSingleRow");
Technical Info: IDEMPIERE-4224