Choose from List for UDT
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 question
HI 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
Similar Messages
-
Choose from list for purchase Item
Dear Experts,
i have created Choose from list in matrix using Screen Painter. its working properly but i want to display only Purchase Items in CFL.
For Customer we are using
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "CardType"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
Like this, How to set condition for Purchase items thru coding or Screen painter
MathiHi Mathi,
Try this and tell me if it worked.
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "PrchseItem"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "Y"
oCFL.SetConditions(oCons)
If this works dont forget to reward points..
Regards,
Vasu Natari.
Edited by: vasu natari on Jul 29, 2008 12:37 PM -
How i create choose from list for profit center
Hello ALL ,
Can any body suggest me how we create the CFL for profit Center .
I am creating add -on using sdk and create a screen form using screen Painter .
In my form there is matrix that contain the profit center column just like in sale order screen .
In this field (Profit Center ) I want to attach the CFL of profit center just like in sales Order screen .
but I am unable to find out the object type ID for profit center so please give me any ideaHi,
Please post is on the SDK forum and close this thread. This is an SDK question.
Thanks,
Gordon -
Can anyone explain how we create Choose from list for profit center in sap b1
Hello ALL ,
Can any body suggest me how we create the CFL for profit Center .
I am creating add -on using sdk and create a screen form using screen Painter .
In my form there is matrix that contain the profit center column just like in sale order screen .
In this field (Profit Center ) I want to attach the CFL of profit center just like in sales Order screen .
but I am unable to find out the object type ID for profit center so please give me any ideaHi Arvind,
Object type for the Profit Center is
<ChooseFromList UniqueID="CFL_1" ObjectType="61" MultiSelection="0" IsSystem="0"/>
and for the Distribution Rule
<ChooseFromList UniqueID="CFL_2" ObjectType="62" MultiSelection="0" IsSystem="0"/>
Hope it helps.
D. -
Choose from list in AR invoice
Hi all!
Can i create function choose from list in AR invoice. I have UDF on INV1, now i want choose from list for this UDF.
Please give me ideas
Thank you very muchHi,
Y dont u try the FMS functionality?
Vasu Natari. -
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 -
Error clicking Choose from list
Hi,Experts
1) Im added two fields on BOM also added choose from list for that.
2)I have written code for event type choose from list
3)But it is showing error exception while clicking on raw choose from list(Already existing raw choose from list)
4) But created choose from list working perfectly
I have written code like this
Try
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
sboForm = SBO_Application.Forms.Item(FormUID)
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = sboForm.ChooseFromLists.Item(sCFL_ID)
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
Dim val As String
Try
val = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
If (pVal.ItemUID = "slsText") Then
sboForm.DataSources.UserDataSources.Item("UDCFL").ValueEx = val
ElseIf (pVal.ItemUID = "slsText1") Then
sboForm.DataSources.UserDataSources.Item("UDCFL1").ValueEx = val
End If
End If
End If
If (FormUID = "CFL1") Or (FormUID = "CFL2") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) Then
Windows.Forms.Application.Exit()
End If
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_PICKER_CLICKED Then
sboForm = SBO_Application.Forms.Item(FormUID)
oItem = sboForm.Items.Item(pVal.ItemUID)
oEdit = oItem.Specific
SBO_Application.StatusBar.SetText("Picker Clicked of type " & oEdit.PickerType.ToString, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
End If
Catch ex As Exception ///Error is shows this exception
MessageBox.Show(ex.Message)
End Tryhi
-
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. -
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. -
Choose from List in A matrix for choosing two or more rows at same time
Hi Friends,
Actually I m using choose from list to select Items in a row, i can select Two or more rows from the List but while clicking choose it is taking only one value.
The no of rows are not activated tat i m choosing from list.
Thanks in advance
VivekHi.
Here is a [link|https://forums.sdn.sap.com/click.jspa?searchID=12829558&messageID=5584893] where are you can find on of my example on CFL on matrix column.
I think, you need to made some changes in code from these lines...
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = oCFLEvento.SelectedObjects
for ...
end for
Reply if this guideline was usefull for you.
Bye -
FMS for Instock for a particular Warhouse in Item Choose From List
Dear Experts,
I have an requirement as such that there are e.g 5 warehouses in Item Master Data as A,B,C,D,E. Now while doing any marketing document when the user press tab in the Item No in the choose from list the Instock Column shows the Total Stock in all the warehouses. Means if Item No 123 has stock in Warehouse A - 2, Warehouse B - 3, Warehouse C - 0 so in the Instock Column it would show as the total of all the Warehouse which is 5 but if I want to show only for a particular Warehouse e.g A which is 2 how can I show it in the choose from list.
I have tried to create a UDF also in the Item Master Data and applied a formatted search as :
SELECT T0.OnHand FROM [dbo].[OITW] T0 WHERE T0.WhsCode = 'A' AND T0.ItemCode = $[$5.0.0]
and the udf seems to be working only in the Item Master Window and showing the A warehouse Stock as 2.
I also brought the Udf column in the choose from List of Items but here its not showing any value for the items as desired.
Can anyone please help and let me know what can be done to sort this issue.
Awaiting for a positive response.
Regards,
DepikaHello ..
Depending on the desired goal, another alternative would be to create a user field in marketing documents to detail.
Later in this field formatted user applies a search that brings the stock in the warehouse of the line detail.
This in Toerien argues that if the document you selected Store A, and in that store there is a stock of 10 units, this amount is what brings the document.
This considering that you can not see it in the select list of items
I hope it will help
Best regards, -
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. -
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 -
Choose from List-CFL button is not visible
Hi Experts,
I am using SAP B1 8.8 PL 05 in ramp up. I have observed that in some of the clients PCs in Sales Order window I am not able to see the Choose from list button / CFL button for selecting Customer Or say Item.
This happens only in some Client PCs, where as in other clients PCs it works fine.
BR
Samir GandhiHi Rashid,
I did that. Now the indicator is displayed, but still I am not able to see the customer / item list.
BR
Samir Gandhi -
Removing Duplicates from a choose from list
Hi All,
I have a choose from list of obj 73 )Catalog Numbers (Table OSCN)
I also added conditions in the CFL that it only shows the Substitute for the CardType = 'S' (Supllier) Business Partners.
But I want to remove all the duplicate Substitutes from the CFL so that only distinct Catalog Numbers shows in the CFL.
// Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "73";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add(oCFLCreationParams);
//Adding Conditions to CFL1
oCons = oCFL.GetConditions();
oCon = oCons.Add();
oCon.Alias = "Substitute";
SAPbobsCOM.Recordset oSuppliers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oSuppliers.DoQuery("Select Distinct t1.Substitute From OSCN t1 Join OCRD t2 on t1.CardCode = t2.CardCode Where t2.CardType = 'S' Group By t1.Substitute");
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
while (!oSuppliers.EoF)
oCon.CondVal = oSuppliers.Fields.Item(0).Value.ToString();
oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
oCon = oCons.Add();
oCon.Alias = "Substitute";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oSuppliers.MoveNext();
oCFL.SetConditions(oCons);
Please advise....
Kind Regards,
Brenden DraperHi Brenden,
what you are trying to archieve won't work. Simply because CFL is getting all row data from OSCN and ItemCode or CardCode can differ for a specific substitute.
For example.
ItemCode,CardCode,Substitute
ItemA,BP1,sub1
ItemA,BP2,sub1
Would be 2 resultlines both with sub1 as substitute.
SQL equivalent :
Select Distinct t0.* from oscn t0 inner join OCRD t1 on t0.CardCode = t1.CardCode where t1.CardType = 'S'
My advise would be to open a simple form with a grid and datatable bound.
Some lines of coding and you get all you need.
regards,
Maik
Maybe you are looking for
-
I have reset my I D but when I go to update apps it asks for password using my old email address??? How do I overcome this issue???
-
AIR SDK 17 - mailto subject line error for non English devices
Hi, Is there a problem with language localization in AIR SDK 17 for iOS? The following code works for an iOS 8 device with the language set to English but if you set it to any other language the subject line is missing! var mailme:URLRequest = new UR
-
Adobe Form is not opening after saved the form locally
Hi Experts, I have implemented the adobe form using webdynpro java using ACF. The scenario is initially the form is loading with input fieIds and dropdown boxes after that the form data has to be submitted into backend. I have encountered the problem
-
Issue in Query..
Hi, I am getting a strange problem in my query for profit_ctr and cost_ctr hierarchies. The text in selection screen for the variables is in short text but when I execute the query it shows the middle text. Please help.
-
Batch title change in photo version 1
The new "Photo" has changed the user interface completely. Is there a way to to the "batch title change" for a group of photos? There are instructions for how to do for one, but I'm hoping that this has not been lost. I'm using version 1. Is there