autocomplete show different list for table and table dir

Description

Overview

table and table direct use different column to query and produce different result list
Test case

  1. on window “Table and Column”, choose table M_Product, column Name. Change Sequence = 0

  2. on window “Table and Column”, choose table C_OrderLine, column M_Product_ID. Change Auto complete = true

  3. on window “Table and Column”, choose table M_Production, column M_Product_ID. Change Auto complete = true

  4. on window “Sale Order”, tab “Order Line”, field product, enter “Patio” => list show 1 item “Patio Furniture Set_PatioSet“

  5. on window *Production (Single Product), tab Production, field product, enter “Patio” => list show 2 items “Patio Furniture Set_PatioSet“ and “Patio Chair_PChair“

Reason

InfoWindow.processQueryValue call testCout with logic bellow:

  1. With isAutoComplete = true and autoCompleteSearchColumn not null and autoCompleteSearchColumn is column in identifiers of infoWindow, will query using column autoCompleteSearchColumn

  2. With isAutoComplete = true and autoCompleteSearchColumn IS NOT column in identifiers of infoWindow, will query using first column of identifiers of infoWindow (value column for product info)

  3. NONE for isAutoComplete = true and autoCompleteSearchColumn EXISTS but IS NOT column in identifiers of infoWindow.

  4. isAutoComplete = false, call once per identifiers until count > 0 (4 time for product info)

  5. isAutoComplete = false, after test for all identifiers (step 4) and still count <= 0 then split queryValue and repeat test (step 4) for split identifiers

MLookupFactory.getLookupInfo call getLookup_Table when AD_Reference_Value_ID != 0 and call getLookup_TableDir when AD_Reference_Value_ID == 0

MLookupInfo.lookupDisplayColumnNames isn’t init in getLookup_TableDir but is init in getLookup_Table

1. => searchcolumn at InfoListSubModel.getSubModel isn't set for product field on sale order line

=> logic (2) is called on InfoWindow.processQueryValue and search for Value column

2. => searchcolumn at InfoListSubModel.getSubModel is set to “name” for product field on Production

=> logic (1) is called on InfoWindow.processQueryValue and search for Name column

Solution:

Copy code init MLookupInfo.lookupDisplayColumnNames in getLookup_Table to getLookup_TableDir

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created September 26, 2023 at 7:06 AM
Updated December 2, 2023 at 1:23 PM
Resolved October 2, 2023 at 12:55 AM