NF13 Record attributes For Decluttering Configuration
Feature: Decluttered Configuration / Attributes on Record
Goal: Technical
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
IsSingleRowattribute:- 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
IsSingleRowattribute. - Select the
IsSingleRowattribute from the dropdown. - Save the record.
- Repeat the process to add
MaxQueryRecordsto the same attribute set.
Link the Attribute Set to the AD_Tab Table
- Go to the to the Table and Column window.
- Search for the
AD_Tabtable. - In the Table tab, go to the sub-tab Table Attribute Set.
- Click New Record.
- 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
IsSingleRowandMaxQueryRecordsif 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
