Add CFL into the matrix columns in SAP B1

Add CFL into the matrix columns:-

In this post i will explain you how to Add CFL into the matrix columns.CFL stands for ChooseFromList .It is feature of the sap that allow you to put the CFl on form items like EditText,Column,Button ,etc.Through it we can  choose value from the list for the form items.

Examples:

I have made a function for adding the cfl into the matrix column. We need to passs only some parameters to this
function that is required for putting the cfl into the matrix.

STEP 1:-We will call the function on the form load event.

STEP 2:-Now Let me explain ,what are these parameters all about.

oColumn : This parameter is specific column of the matrix.(with ColUID-“ColItemCode”).
strObjectType : This parameter takes ObjectID (like 1,2,3,4).You want to open in to the columns.(Ex-4 for the Item Master)
strAliasName :This parameter takes field name of the database column.(Ex-“ItemCode”)
oCFLCollection :It is a collection of ChooseFromList Objects in the form. (Ex- oCFLs = oForm.ChooseFromLists)
bIsMultiSelect :this parameter takes true or false.If true then you can select multiple values if false then we can select only single value.(Ex-False)
oConditions : condition on which you want to filters the record.(Ex-SAPbouiCOM.Condition oCondition=null; pass oCondition object if you don’t want to put condition)
oSBOApplication:Pass Aplication Object

STEP 3:-Now i am  giving the definition of the function.

After calling this function Cfl will be opend on the column of the matrix but the selected value can not be set on the columns of the matrix.

STEP4:- Setting the selected value into the column.
For setting on the column what will have to do ,we need to put code for setting the value in the column in ChooseFromListAfter event. This code is as:
Example:- Suppose ColumnId=”ColItemCode” and we have made matrix instance as oMatrix. Then we can set the value into the column as.