DOC - CFL to Select Incoterm Code

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.

This rule is specific for the Brazilian localization, but the logic could be use for other similar purposes.


Attached is one CFL rule that will let you select the Incoterm code on the Tax tab from a UDT.


The templates require coresuite Version 3.50 or higher, and SAP Business One 8.8 or higher.

Procedure to use these templates

1. Download the attached FAQ_10176_CFL_Inc... file

2. Import in SAP Business One via > Administration > Add-Ons > coresuite customize > Import / Export > Import rules. In the message box, select “All Active”. Click on “Import”.

3. Create the UDT WBC_INCOTERMS as seen in the picture.



To check the rule in action:

Just get or create a Sales Order.  Focus on the Incoterm field in the tax tab and press the tab key to bring up the CFL list with all the Incoterms available.  Double click on one of them and the code is inserted in the field.

Procedure to adjust these templates

Only form 139 (Sales Orders) is supported. If other marketing documents are needed just add the form ID on the ItemUID on the Trigger area in the Optimizer window.


Preview Sample (Optimizer Rule C#):

// Created by coresuite customize wizard 
// Parameters
string itemUID = "2018"; string columnID = "";
string query = "SELECT U_ITNUM as 'Número', U_ITCODE as 'Código', U_ITDESC as 'Descrição' FROM [@WBC_INCOTERMS] ORDER BY [%ordercolumn] [%order] ";
string writeBackColumn = "Número";

// Create CFL and add it to the field
SwissAddonFramework.UI.Dialogs.ChooseFromList cfl =
new SwissAddonFramework.UI.Dialogs.ChooseFromList(
new SwissAddonFramework.UI.Dialogs.ChooseFromList.DefaultSQLQuery(query)
, writeBackColumn
, true
, true
, TextEdit.GetFromUID(pVal.Form, itemUID));
catch(System.Exception ex) // Error handling
MessageBox.Show("Error while adding the cfl to the field (coresuite customize wizard): " + ex.Message, "OK");
// Return value: true if all ok, false if you want SAP B1 to stop proceed
return true;


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.