GEN - Custom ChooseFromList CFL

Important Notes

The samples and information below is provided without a warranty of any kind. This post is for informational purposes and coresystems ag assumes no responsibility for errors or omissions in the information provided.

Purpose

Attached is 1 customize optimizer rule that will adjust the standard choose from list when selecting items in rows of documents. So you can display additional columns with more detailed item information in the choose from list.

Requirements

The sample requires coresuite Version 3.50 or higher, and SAP Business One 8.8 or higher.

Procedure to adjust this small solution

This rule can be used by those users who want to personalize the displayed Choose From List (CFL) when the standard SAP Business One CFL does not provide enough information. In the code below and in attached rule the changes to be done for different cases are highlighted with TODO and described.

In total only 3 lines of code need to be changed in 80% of the use cases.

for (int index = 0; index < g.SelectedRows.Count; index++) { // TODO: here write the column that should be written back to the item where the action has been triggered. itemCodeList[index] = g.GetValue("ItemCode", g.SelectedRows.RowIndex(index)); // In this case the column "ItemCode". // This MUST match one of the columns returned by the query. } f.Close();