Choose from list in the system
Hi
I want to create the Choose from list in the System form (Employee Master Data) in the edit box. what is the coding for this ? can anyone help me ...
Regards
Bhuvana
Edited by: bhuvana eshwari on Aug 7, 2008 8:23 AM
Hi
i am adding three fields in Employe Master Data under Adminstration folder and fourth field in Employe Master Data,
Choose from list is added in the fourth field. please see this coding...
Public Class class1
Public WithEvents oApplication As SAPbouiCOM.Application
Private oOrderForm As SAPbouiCOM.Form
Private oNewItem As SAPbouiCOM.Item
Private oItem As SAPbouiCOM.Item
Private oFolderItem As SAPbouiCOM.Folder
Private oOptionBtn As SAPbouiCOM.OptionBtn
Private oCheckBox As SAPbouiCOM.CheckBox
Dim ostatic As SAPbouiCOM.StaticText
Dim ocombo As SAPbouiCOM.ComboBox
Dim oCompany As SAPbobsCOM.Company
Dim oRecordSet, rs1, rs2 As SAPbobsCOM.Recordset
Dim oSboGuiApi As SAPbouiCOM.SboGuiApi
Dim nerr As Long
Dim oedit, oedit1, oedit2 As SAPbouiCOM.EditText
Dim obutton As SAPbouiCOM.Button
Dim oform As SAPbouiCOM.Form
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
Public Sub setapplication()
Dim Cookie, EncryptedCookie, Connstring As String
Dim nerr As Long
oCompany = New SAPbobsCOM.Company
Connstring = Environment.GetCommandLineArgs.GetValue(1)
oSboGuiApi = New SAPbouiCOM.SboGuiApi
oSboGuiApi.Connect(Connstring)
oApplication = oSboGuiApi.GetApplication
oApplication.MessageBox("hi u r connected to the application")
Cookie = oCompany.GetContextCookie
EncryptedCookie = oApplication.Company.GetConnectionContext(Cookie)
nerr = oCompany.SetSboLoginContext(EncryptedCookie)
oApplication.MessageBox("single sign on worked")
If oCompany.Connected = False Then
nerr = oCompany.Connect
If nerr <> 0 Then
Else
oApplication.MessageBox("Company got connected successfully")
End If
End If
End Sub
Private Sub AddItemsToOrderForm()
oItem = oOrderForm.Items.Item("90")
oNewItem = oOrderForm.Items.Add("s1", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Referal Name"
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("81")
oNewItem = oOrderForm.Items.Add("e1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oedit.DataBind.SetBound(True, "OHEM", "U_rename")
oItem = oOrderForm.Items.Item("s1")
oNewItem = oOrderForm.Items.Add("s2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "ReferalEmp No "
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("e1")
oNewItem = oOrderForm.Items.Add("e2", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oedit.DataBind.SetBound(True, "OHEM", "U_reid")
oItem = oOrderForm.Items.Item("s2")
oNewItem = oOrderForm.Items.Add("s3", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Floor"
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("e2")
oNewItem = oOrderForm.Items.Add("e3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ocombo = oNewItem.Specific
ocombo.ValidValues.Add("", "")
ocombo.ValidValues.Add("FLOOR1", 0)
ocombo.ValidValues.Add("FLOOR2", 1)
ocombo.ValidValues.Add("FLOOR3", 2)
ocombo.ValidValues.Add("FLOOR4", 3)
ocombo.ValidValues.Add("FLOOR5", 4)
oNewItem.FromPane = 3
oNewItem.ToPane = 3
ocombo.DataBind.SetBound(True, "OHEM", "U_refl")
oItem = oOrderForm.Items.Item("3")
oNewItem = oOrderForm.Items.Add("s4", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Referal Details"
oNewItem.FromPane = 0
oNewItem.ToPane = 0
oItem = oOrderForm.Items.Item("33")
oNewItem = oOrderForm.Items.Add("e4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 0
oNewItem.ToPane = 0
addcfl()
oedit.DataBind.SetBound(True, "OHEM", "U_refer")
oedit.ChooseFromListUID = "cfl_1"
oedit.ChooseFromListAlias = "firstName"
End Sub
Public Sub New()
MyBase.New()
setapplication()
End Sub
Private Sub LoadFromXML(ByRef FN As String)
Dim oXmlDoc As Xml.XmlDocument = New Xml.XmlDocument
Dim sPath As String
sPath = IO.Directory.GetParent(Application.StartupPath).ToString
oXmlDoc.Load(sPath & "\" & FN)
oApplication.LoadBatchActions(oXmlDoc.InnerXml)
End Sub
Public Sub oApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
If pVal.FormType = "60100" Then
If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
oOrderForm = oApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
AddItemsToOrderForm()
End If
End If
If pVal.FormTypeEx = "60100" And pVal.ItemUID = "e4" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.InnerEvent = False Then
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
If oCFLEvento.Before_Action = True Then
oform = oApplication.Forms.ActiveForm
Try
oCFL = oform.ChooseFromLists.Item("cfl_1")
Dim oDataTable As SAPbouiCOM.DataTable
Dim oEdit As SAPbouiCOM.EditText
Dim Name As String
oform = oApplication.Forms.Item("60100")
oDataTable = oCFLEvento.SelectedObjects
oEdit = oform.Items.Item("e4").Specific
Name = oDataTable.GetValue("firstName", 0)
oEdit.String = Name
Catch ex As Exception
oApplication.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_None)
End Try
End If
End If
If oedit.Value = "firstName" Then
LoadFromXML("new.srf")
oform = oApplication.Forms.Item("re_form")
oform.Visible = True
oedit = oform.Items.Item("cf1").Specific
End If
End Sub
Private Sub addcfl()
Dim ocflcreation As SAPbouiCOM.IChooseFromListCollection
ocflcreation = oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
ocflcreation.MultiSelection = True
ocflcreation.ObjectType = "171"
ocflcreation.UniqueID = "cfl_1"
oCFLs = oform.ChooseFromLists
oCFL = oCFLs.Add(ocflcreation)
End Sub
End Class
Regards
Bhuvana
Similar Messages
-
Reagrding the choose from list using user tables
Hi
I need to link <b>the choose from List to my user defined table</b> and not to system tables.
for eg., i have created a table namely opp. Now i want to link choose from list to this table.
can anyone help me??
its very urgent...
thanks in advance
Leehi Adele
thanks for your concern.i have used this code
Dim OCFLS As SAPbouiCOM.ChooseFromListCollection
Dim OConds As SAPbouiCOM.Conditions
Dim OCond As SAPbouiCOM.Condition
OCFLS = OForm.ChooseFromLists
Dim OCFL As SAPbouiCOM.ChooseFromList
Dim OCPack As SAPbouiCOM.ChooseFromListCreationParams
OCPack = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
OCPack.MultiSelection = False
OCPack.UniqueID = "CFL3"
OCPack.ObjectType = "OPRQ"
OCFL = OCFLS.Add(OCPack)
Catch ex As Exception
MsgBox(Err.Description())
End Try
<b>then i link the choose from list to the Button(choosefromlist) namely OLBut. the code is follws</b>
<b>ONewItem = OForm.Items.Item("67")
OLBut = ONewItem.Specific
OLBut.ChooseFromListUID = "CFL3"</b>
but this is not working.i.e when i click the choose from list button nothing it is showing.what mistake i have done?please help me
thanks in advance -
Edit and text and choose from list
hello,
I am trying to create a form that resemle to the purchase order form.
In the purchase order form when we select the card code from the choose from list
the system fill all the fileds like the name docnum .. with relevant information.
i tried to do that by using the vent et_evaluate of the edit text bind with the Card code in my form.
The problem is that when i clik on the choose from list button the event is lanched and then the value of the card code is "" so i can't crate my queries to get the infomation like suplier name and ..
does any body have an answer?
This my code:
switch (pVal.ItemUID)
case "3":
_Form.Freeze(true);
try
string NumFournisseur =
((EditText) _Form.Items.Item("3").Specific).Value;
ArrayList DFournisseur =
new DB.PurchaseRequest(_SboCompany).
GetDetailsFournisseur(NumFournisseur);
EditText Textvar;
// remplir nom fournisseur et nom contact
Textvar = (EditText) _Form.Items.Item("2").Specific;
Textvar.String = DFournisseur[0].ToString();
Textvar = (EditText) _Form.Items.Item("4").Specific;
Textvar.String = DFournisseur[1].ToString();
// remplir les dates comptable , de livraiosn et du document
Textvar = (EditText) _Form.Items.Item("17").Specific;
Textvar.String = DateTime.Today.ToString();
Textvar = (EditText) _Form.Items.Item("19").Specific;
Textvar.String = DateTime.Today.ToString();
Textvar = (EditText) _Form.Items.Item("21").Specific;
Textvar.String = DateTime.Today.ToString();
// remplir devise partenaire et numéro document
((EditText) _Form.Items.Item("59").Specific).String =
new DB.PurchaseRequest(_SboCompany).GetCurrencyCode(
NumFournisseur);
_Form.Items.Item("59").Visible = true;
_Form.Items.Item("59").Enabled = false;
((ComboBox) _Form.Items.Item("10").Specific).Select(
"primary",
BoSearchKey.
psk_Index);
((EditText) _Form.Items.Item("11").Specific).String =
new DB.PurchaseRequest(_SboCompany).GetLastDocNum().
ToString();
((EditText) _Form.Items.Item("12").Specific).String = "0";
catch (Exception e)
Console.WriteLine(e.Message);
_Form.Freeze(false);
break;
break;
catch (Exception ex)
Console.Write(ex.Message);
break;Hey Achref,
You can use the event and code like this:
string vendCode = string.Empty;
SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent) pVal;
string sCFL_ID = oCFLEvento.ChooseFromListUID;
SAPbouiCOM.ChooseFromList oCFL = oVendorSourcingForm.ChooseFromLists.Item(sCFL_ID);
SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
if (oDataTable != null)
//get selected value from datatable
if (oDataTable.Rows.Count > 0)vendCode = oDataTable.GetValue(0, 0).ToString();
Also check out 17.ChooseFromList in the samples that you can download.
Hope that helps
Curtis -
Problem in Choose from list.
Hi,
As I tried CFL for a user defined form, when I select an item from CFL and it is displaying in the relevant field. And when I save the data it is perfectly saving with the message of "Operation has been completed successfully". But the data is not saving in the field in which is the CFL is activating.
It would be appreciated, if any one can give the solution please.
The steps I' ve followed as,
1. In the screen painter I' ve added the choose from list thru' the collection folder.
2. Then the choose from list id is attached and give the allias in the item's specific property.
3. Then I' ve written code in the load form function as follows.
Oform.DataSources.UserDataSources.Add("EditDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
txtaccode.DataBind.SetBound(True, "", "EditDS")
4. In the item event
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
Dim val As String
Dim val1 As String
Dim val2 As String
Dim val3 As String
Try
Try
val = oDataTable.GetValue(0, 0)
val1 = oDataTable.GetValue(1, 0)
If (pVal.ItemUID = "txtaccode") Then
oForm.DataSources.UserDataSources.Item("EditDS").ValueEx = val
txtaccode.Value = val
oForm.DataSources.UserDataSources.Item("EditDS1").ValueEx = val1
End If
Catch ex As Exception
Exit Sub 'For Exception raised for Cancel Button
End Try
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End If
End SubChecks if the property TableName in the field is pointed to the table to store de data.
Go to Example: How to binding CFL to a UDO in a customized System Form. and rate it
regards -
Choose From list in Matrix UDF
i create a UDF in Sales Order Row, I want to assign choose From list in the Matrix for the UDF once user click on tab button.
How can i assign the Choose from list for the UDF column?Hi,
Try this code for adding CFL.
SAPbouiCOM.ChooseFromListCollection oCFLs = null;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon = null;
oCFLs = oForm.ChooseFromLists;
SAPbouiCOM.ChooseFromList oCFL = null;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "object id ";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add( oCFLCreationParams );
oColumn.ChooseFromListUID = "CFL1";
//where oColumn is the instance of that column.
Hope u will get help....
Thanks and Regards,
Lalit -
Change data in existing "Choose from list" matrix
Hi,
in UI GUI->order form . When add a new order, hit "TAB" to select BP from existing list. I want to use my own sql to populate the BP list (currently the GUI defaults to return all customers).
Is there a way? I mean if I just want to change data in the matrix and let B1 continue to make the "Choose from list" form (form "10001") with my own new customer list. Set BubbleEvent = true will just re-read all cards after I query my result.
any help is appriciated!Hello,
I came across the same issue with the Items Choose from List on the Sales Order screen. It is possible to load your own Choose from List form and populate the matrix using recordset objects and userdatasources. The same logic could be applied to the BP Choose from List form. The following code displays the user form and matrix items - separate code is needed to handle the selection process on this form. There maybe a faster way of acheiving this using UDTs etc but it seems to work ok.
'When user presses Tab key in Item No. column.
If pVal.EventType = et_KEY_DOWN Then
If pVal.ItemUID = "38" And pVal.ColUID = "1" And _
pVal.Before_Action = True And pVal.CharPressed = vbKeyTab Then
'Load new Choose from List form.
'This is actually an exported and edited version of the SBO form.
LoadFromXML sIIS_ITEMLIST_XML
'Populate matrix with items returned from SQL query.
'Use recordset, arrays, userdatasources.
Set oRecordSet = oCmp.GetBusinessObject(BoRecordset)
sSql = "Select OITM.ItemCode, OITM.ItemName, OITM.OnHand FROM OITM " & _
"Where Upper(Left(OITM.ItemCode,2)) = 'B1'"
oRecordSet.DoQuery sSql
nRows = oRecordSet.RecordCount
If nRows <> 0 Then
'Array declarations.
Dim ItemCode(), ItemName(), OnHand()
ReDim ItemCode(nRows - 1)
ReDim ItemName(nRows - 1)
ReDim OnHand(nRows - 1)
'Add userdatasources to form.
oForm.DataSources.UserDataSources.Add "ItemCode", dt_LONG_TEXT, 20
oForm.DataSources.UserDataSources.Add "ItemName", dt_LONG_TEXT, 100
oForm.DataSources.UserDataSources.Add "OnHand", dt_LONG_NUMBER
i = 0
'Populate arrays from recordset.
Do While oRecordSet.EOF <> True
ItemCode(i) = oRecordSet.Fields.Item(0).Value
ItemName(i) = oRecordSet.Fields.Item(1).Value
OnHand(i) = oRecordSet.Fields.Item(2).Value
oRecordSet.MoveNext
i = i + 1
Loop
'Bind data fields to form items.
Set oMatrix = oForm.Items.Item("7").Specific
Set oColumn = oMatrix.Columns.Item("ItemCode")
oColumn.DataBind.SetBound True, "", "ItemCode"
Set oMatrix = oForm.Items.Item("7").Specific
Set oColumn = oMatrix.Columns.Item("ItemName")
oColumn.DataBind.SetBound True, "", "ItemName"
Set oMatrix = oForm.Items.Item("7").Specific
Set oColumn = oMatrix.Columns.Item("OnHand")
oColumn.DataBind.SetBound True, "", "OnHand"
'Get data from datasources.
Dim oUItemCode As SAPbouiCOM.UserDataSource
Dim oUItemName As SAPbouiCOM.UserDataSource
Dim oUOnHand As SAPbouiCOM.UserDataSource
Set oUItemCode = oForm.DataSources.UserDataSources.Item("ItemCode")
Set oUItemName = oForm.DataSources.UserDataSources.Item("ItemName")
Set oUOnHand = oForm.DataSources.UserDataSources.Item("OnHand")
oMatrix.Clear
'For each returned record in recordset then
'add row to matrix and populate it from
'userdatasource.
For i = 1 To nRows
oMatrix.AddRow
oUItemCode.Value = ItemCode(i - 1)
oUItemName.Value = ItemName(i - 1)
oUOnHand.Value = OnHand(i - 1)
oMatrix.SetLineData
Next i
End If
'Show form. This also sets focus to edittext field.
oForm.Visible = True
'Don't display standard SBO item list form.
BubbleEvent = False
End If
End If
Regards,
Andrew. -
Choose From List and Golden arrow link in System Matrix UDF column
I'm wondering if there is a way through the SDK to create a 'Choose From List' and Golden arrow linked button in a System Matrix UDF column?
For example the Item Code in a sales order matrix does both.Hi,
Try this code for adding CFL.
SAPbouiCOM.ChooseFromListCollection oCFLs = null;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon = null;
oCFLs = oForm.ChooseFromLists;
SAPbouiCOM.ChooseFromList oCFL = null;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "object id ";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add( oCFLCreationParams );
oColumn.ChooseFromListUID = "CFL1";
//where oColumn is the instance of that column.
Hope u will get help....
Thanks and Regards,
Lalit -
Choose From List used in UDO (B1 2004)
Hi,
in the presentation "Creating a UDO of document type.pps" (slide 53+55) provided with the SDK 2004 they use the Choose From List to select business partners and/or items in their UDO form when adding a new document. Does anyone know, how this has to be done? The sample, from the presentation is not provided in the sample codes.
Do I have to use an implementation DLL for my UDO to use this functionality?
My problem is, that it takes too long (about 5 times longer than with the system CFL) to get all items in my custom defined matrix.
thanks,
MarkusHi Markus,
You cannot use the built-in CFL in version 2004. It is only exposed from version 2005. The only suggestion is to look at optimizing your matrix. All CFLs in the system uses DB Datasources which makes populating the grid faster than using User data sources.
Hope it helps,
Adele -
Choose From List From a UDT in SAP Business One 2005 A
Hi All
How to develop a Choose From List from a <b>User Defined Table</b> (not from System Tables) in SAP Business One 2005 A.
I need the Choose From List should display the records stored in the UDT.
Any Idea ?
Thanks in Advance.
Regards.
Asutosh.Hi Asutosh,
You can add a CFL to a User Defined Object, not a simple User Defined Table.
In order to do it you only have to set the object type of the CFL to the code of your UDO.
Here you have a simple:
oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCPuo.ObjectType = "MY_UDO_CODE"
oCFLCPuo.UniqueID = "UserObjectCFL"
oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
Hope it helps
Trinidad. -
I have made a UDT
and I want to create a choose From List of that table
I know how to create choose frm list for system tables
like making Business partner choose from list
but I'm not able to make choose frm list for UDT
please someone answer my questionHI Riya,
You can link a CFL to a User Defined Object but not a plain User Defined Table. A full list of options can be found in the UI help under BoLinkedObject Enumeration.
Thanks,
Lisa
SAP Business One Forums -
[SBO 2005] Choose from list on User Table
Hi all,
I need an information from the developper that already tried the SDK of BO 2005.
Is it possible to create Choose from List on user tables ?
I looked at the WebEx, there is no restriction about it, but when I tried in the demo, I can't figure out how to do it.
Thanks for your help
SébastienThank for your input Edward:
I do have the sample, but it uses a system table (OCRD, Object Type=2)
It seems that it works for system object or UDO, but not for simple user table. Am I right ?
Sebastien -
Hi all,
I am trying to develop a custom choose from list functionality for my addon. I have created two forms first.srf and second.srf .In the key down event of an edittext in my first form i wrote the code for opening the second form
LoadFromXML("Second.srf")
Private Sub LoadFromXML(ByRef FileName As String)
Dim oXmlDoc As Xml.XmlDocument
oXmlDoc = New Xml.XmlDocument
Dim sPath As String
sPath = System.Windows.Forms.Application.StartupPath()
sPath = sPath.Remove(sPath.Length - 3, 3)
oXmlDoc.Load(sPath & "" & FileName)
B1Connections.theAppl.LoadBatchActions(oXmlDoc.InnerXml)
End Sub
second form is loading very well but my problem is that in the form load event of the second form when i try to access the grid i will get an error message
Item - Invalid Item [66000-3]. Form unique Id "Second", Item Unique Id : "grdItem"
I am using SAP B1 8.8 PL 10, visual Studio 2008 and B1DE 2.1.
Any help
Regards
ArunHi Sebastian,
Thanks for your reply. i used
Dim oForm As SAPbouiCOM.Form = B1Connections.theAppl.Forms.GetForm("FrmSecond", 0)
to get the form also tried
Dim oForm As SAPbouiCOM.Form
oForm = B1Connections.theAppl.Forms.ActiveForm
but not working . second forms unique id and type are set correctly but the object type is not set because this form is not binded to any UDT.
The OForm objects item count is always 0
Thanks in advance
Regards
Arun -
Is it possible to populate a Choose From List manually?
Hi
I've got a requirement in a SDK screen that needs to be written to have a Choose From List contained on a Matrix column that should allow the selection of Item Masters as well as the selection of specific data contained within a User Defined Table. Whenever using ChooseFromLists I've always only ever used them to link to a object such as Items, Sales Order etc. and not a combination, or even to a User Defined Table. Is this even possible.
If not I guess the only way around it would be to create a form mimicking the ChooseFromList which I could populate with what ever I like?
Thanks
SteveHi Steven,
Yes, Its possible which behaves as system CFL.
Design the form like cfl having grid, choose button, cancel button and edittext of find. When you tab on edittext on form open the CFL form and after load form fill the grid by Datatable using sql query. Write code for select grid line on click of grid. Write the code on choose button which retrive value from grid.
Thanks,
Mahesh -
Business Partner Choose from lists
It would be good if the choose from lists would display only active Business Partners (and Items) by default, and have a check box to display inactive as well?
This would be very useful for customers who have been using the system for some time and have many inactive customers, suppliers, leads and items, and employees!
In general, only active ones should be chosen by the majority of users, and this would reduce the size of the lists to be displayed.Closed so I can open another thread
-
Multiple Values For one Condition in Choose From List
I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.
Hi,
Check this thread
How to set a Multiple condition in a single CFL
Hope that helps,
Vasu Natari.
Maybe you are looking for
-
Memory Advise for MSI 790FX-GD70
Whoever may help, Hi all, i'm trying to build a computer, i have all except the memories, im intent to go to 8GB DDR3 1333mhz but i dont know which brand/memory is compatible for this board. if anyone could help me in this i would appreciated. Th
-
How to create long text in selectio texts.
Hi, In Selectio ntexts its allowing me to create upto some 35 charcters. If i want to write more than that, what is the procedure. Thanks in advance Eswar
-
My new leveno won't allow me to open pdf files with adobe
my new leveno with windos 8 will not let me open pdf files in outlook
-
Full text PDF indexing for website search?
Hi. We run a couple of websites on CQ5.5 and are trying to get the PDF files we refer to in the DAM to show in search results that users conduct on our sites. I've seen a number of references that imply that full text searching of PDFs is possible.
-
Why PHP is better than JSP,Servlet(Java Web Apps) ?
Well, my heart says JSP, Servlets are better but rent a coder and job market, demand-supply seems to be saying a different story... ? Why we should not learn PHP then ?