NF12 Record attributes For Decluttering Configuration

From iDempiere en

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

  1. Navigate to Attribute window in iDempiere.
  2. Click on New Record.
  3. Fill in the details for the IsSingleRow attribute:
    • Name: IsSingleRow
    • Reference: Select the appropriate reference (e.g., YesNo).
  4. Save the record.
Attribute-IsSingleRow.png
  1. Repeat the above steps to create another attribute for MaxQueryRecords:
    • Name: MaxQueryRecords
    • Reference: Number
  2. Save the record.
Attribute-MaxQueryRecords.png

Create an Attribute Set for AD_Tab

  1. Go to the Attribute Set window.
  2. Click on New Record.
  3. Fill in the details:
    • Name: Tab Attribute Set
    • Attribute Set Type: Choose Table Attribute.
  4. Save the record.
AttributeSet-TabAttributeSet.png

Add IsSingleRow and MaxQueryRecords to the Attribute Set

  1. While in the Attribute Set window, navigate to the Attribute tab.
  2. Click on New Record to add the IsSingleRow attribute.
  3. Select the IsSingleRow attribute from the dropdown.
  4. Save the record.

AttributeUse-IsSingleRow.png

  1. Repeat the process to add MaxQueryRecords to the same attribute set.
AttributeUse-MaxQueryRecords.png

Link the Attribute Set to the AD_Tab Table

  1. Go to the Table and Column window.
  2. Search for the AD_Tab table.
  3. In the Table tab, set the Attribute Set to Tab Attribute Set (the one created earlier).
  4. Save the record.
TabAttributeSet-Config.png

Add Attribute Values for a Specific Tab

  1. In the Menu, navigate to Application Dictionary > Window, Tab & Field.
  2. In the Window, Tab & Field window, use the search functionality to locate the Product window.
  3. Locate the Product tab within the Product window records.
  4. 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.
  5. Once the Product Attribute Info form opens, you'll see a list of attributes linked to the Tab Attribute Set (such as IsSingleRow and MaxQueryRecords if already defined).
    1. Set the desired value: IsSingleRow: Set it to
      • Checked means Y (Yes).
      • Unchecked means N (No).
    2. MaxQueryRecords: Set its value (e.g., 100)
  6. After setting the values for IsSingleRow (checkbox) and MaxQueryRecords, click the OK button in the Product Attribute Info form to save the changes.
ProductWindow.png
ProductTab.png




Product Attribute Info.png


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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.