Customize ChooseFromList in System Form
It is possible to customize the ChooseFromList of TaxCode (A/P Invoice) i.e only TaxCode of type CST should be displayed and not the VAT.
hi,
yes u can customise by using CFL Conditions on Form Load event.
Private Sub AddChooseFromList()
Try
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oCFLs = oForm.ChooseFromLists
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "128"
oCFLCreationParams.UniqueID = "CFL_Cons"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "Code"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_START
oCon.CondVal = "CST" 'this shows the value which starts with CST
oCFL.SetConditions(oCons)
Dim oMatrix As SAPbouiCOM.Matrix = SBO_Application.Forms.Item("FormUID").Items.Item("MatrixUID").Specific
oMatrix.Columns.Item("TaxColUID").ChooseFromListUID = "CFL_Cons"
oMatrix.Columns.Item("TaxColUID").ChooseFromListAlias = "Code"
Catch
MsgBox(Err.Description)
End Try
End Sub
hope this is your result.
regards,
varma
Similar Messages
-
Problem with AddRow() in custom matrix on System Form
Hello all,
I'm trying to add 1 row to a custom matrix on a system form (Sales Quotation).
However I always get a RPC_E_SERVERFAULT exception when calling pMatrix.AddRow() and SBO crashes...
My code is simple:
[B1Listener(BoEventTypes.et_CLICK, false)]
public virtual void OnAfterClick(ItemEvent pVal)
Form pForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
// Add matrix line
Matrix pMatrix = (Matrix) pForm.Items.Item("MATRIX").Specific;
pMatrix.AddRow();
// Set matrix line data
The matrix shows ok in the system form, inside a new folder.
What is the problem with my code?
Is there any way to add rows to a custom matrix in a system form?
This code runs ok if executed in a custom form...
Thanks!
Manuel Diashi.
R u facing any problem ...
actually add row and del row both are same.
in normal customization form and system form matrx...
Any problem are u facing... -
How to call System Form base on User Form
I want to reuse System Form that "list of items" on service call,
Show the "list of items" Form base on my own Form,
How to do?
thanks
TonyHi Tony,
Have you looked at the ChooseFromList object? This is available in the UI API and allows you to easily create the 'lists' windows for all the main objects, including items. There is an example of using the ChooseFromList in the samples in the SDK.
Kind Regards,
Owen -
I have a system form that I'd like to use to be able to select sales orders.
The form can be found through Sales A/R -> Delivery -> Sales Order button and is called "List of Sales Orders" with an ID of 10016.
The only way I've managed to load it up is by calling Application.ActivateMenuItem(Delivery MenuUID) and then activating the click event on the "Sales Order" (#36) button of the form. I can then get a handle on the form, but doesn't look very good to the user.
Any ideas as to how I can access this form more directly?Sorry Trinidad, I've just come back to my code where I need to add this ChooseFromList and am having trouble.
I'm trying to assign this SalesOrder ChooseFromList to an EditText. Can you point out what is wrong with the code:
Dim itmOrder As Item = form.Items.Item("tbOrder")
Dim tbOrder As EditText = itmOrder.Specific
Dim ds As UserDataSource = form.DataSources.UserDataSources.Add("dsSalesOrder", BoDataType.dt_SHORT_TEXT, 10)
tbOrder.DataBind.SetBound(True, "", "dsSalesOrder")
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCFL As SAPbobsCOM.ChooseFromList
Dim oCFLParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLParams = B1Connections.theAppl.CreateObject(BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLParams.MultiSelection = False
oCFLParams.ObjectType = "17"
oCFLParams.UniqueID = "cflDispatchSalesOrder"
'oCFL = oCFLs.Add()
oCFL = form.ChooseFromLists.Add(oCFLParams)
tbOrder.ChooseFromListUID = "cflDispatchSalesOrder"
tbOrder.ChooseFromListAlias = "cflDispatchSalesOrderAlias"
Thanks in advance for your help again. -
hello to all,
Is it possible to filter the contents of CFL which is in System Form. For Example Project CFL in AR invoice. i.e i need to only show the limited Projects, not all which is in OPRJ Table.
Regards
BikramHi vasu,
the code you have given me is working on Sales Order, but the same code is not working on A/R Invoice CFL for Project Code.
the only difference in mine n urs condition is mine CFL is in Matrix Column and urs in Form.
Here is my Code:
If pVal.FormType = 133 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
If pVal.ItemUID = "39" And pVal.ColUID="4" Then
If pVal.InnerEvent And pVal.Before_Action Then
BubbleEvent = False
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Dim oCons As SAPbouiCOM.Conditions
Dim oCFL As SAPbouiCOM.ChooseFromList
'oCFL = oCFLs.Add(oCFLCreationParams)
oCFL = oForm.ChooseFromLists.Item("26")
oCons = oCFL.GetConditions()
'Note: Add the condition only once.
If 0 = oCons.Count Then
Dim oCon As SAPbouiCOM.Condition
oCon = oCons.Add()
oCon.Alias = "PrjCode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "000000"
'Set your own condition here instead of the system conditions
oCFL.SetConditions(oCons)
End If
BubbleEvent = True
End If
End If
End If -
How can I change the tax formula in system form ?
Hi,
Usually the tax is extra-added for 5% in calcaulating.
But now I need to change the formula of tax to be embeded.
How can I change the tax formula in system form ?
Besr regard!Great!
I suppose "Speed-button" is the same as "toolbar button", right?
To all (more or less):
It confirms that I am on the right track when I bother the participants in this forum time-after-time with remarks to train themselves - or get trained - in application + customization features (+ SDK).
Of course as developers we can use the SDK for whatever purpose and try to develop additional functionality - ... that might already be there, but we just don't know about it
In addition the power of customization features (UDFs/UDTs/queries/formatted searches (also bound to fields on SAP Business One forms)...) should not be underestimated!!!
When starting development with SDK you - or the person who writes the specifications for an Add-On must IMHO be familiar with the application + the customization features + being trained with SDK to avoid unnecessary development or getting into trouble latest when the solution is shipped to a customer...
Please again note that there's a lot of eLearning available in the education area in the SMB Portal on SAP Service Marketplace.
Regards,
Frank -
How to Refresh System Form in Run Time
Dear All,
Please give me idea for Refresh System Document in Run Time using DI,basically I am using system columns for update for some scenarios.
So please give solution that how should refresh system form.
Thanks a lot.
Ashish Singh.Hi,
Please post above discussion in SDK forum.
Thanks & Regards,
Nagarajan -
How to create add-on of a system form in sap b1 9.0?
Hi all,
I have a problem related to the creation of a system form add-on of sap b1 9.0.
I can develop some projects in visual basic, but about sap b1 add-on, I know how to package files of to install (.ard and .exe files) and I also know how to register .ard file in sap b1 9.0, So I tried to register all projects found in SDK sample folder that was correct.
I tried to do an example of project found in SDK Help Center.
But the problem I have to day related to the creation of system form add-on.
The steps I tried to do are:
1. I opened SAP B1 Studio for Microsoft Visual Studio
2. Right click my project and add the system form (Employee Master Data)
3 Connection string I used in Command line arguments 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
4. I added one field (CFL of BPCode) to Employee Master Data. I did n't add any reference because when I add UI API Vission 9.0 to system form or user form of sap b1 it gives errors in Menu.vb. I do know why.
5. I converted in 32 bit and build my project
6. I re_opened new visual studio 2010 for creating new project with SAP B1 AddOnInstaller.NET Wizard
7. From here I did every thing according to the video of Bryan Gomez
Creating and Registering SAP Add-on - YouTube
8. I registered my .ard file
9. But when I start my add-on it gives error (Add-on connection timed out)
The questions I want to ask,
1. If you are creating the add-on of system form Is there any other thing needed to do more than the above I explained?.
2. Is it necessary to go in SDK code when you are using the system form like that?.
3. If it is necessary to add reference of UI API in project, how to handle error occurs when we add that the reference to the project which is using a system form?.
Please anyone who has an idea he/she can help me.Hi pallavi p,
That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
So let me give you the way you can try.
1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
2. Right click on your project
3. Add new item
4. Sap Business One
5. System form (Employee master data) or user form
6. Add
And then if your form is opened
7. Go to add the reference of UI API Version 9.0
8. Check errors found in menu.vb (or in OutPut)
So if it's possible try to solve that problem.
Please anyone can help me. -
!0.5.8 How do I copy the 'system' form one internal Hard drive to an other (BY CD Packed up) I have tried but it will no show 'live' system folder - do and how can I bless it ? Thank you
Carbon Copy Cloner will allow you to de-select directory trees, so you could use it to copy over everything EXCEPT the /Users directory tree.
Mac OS X is NOT just the System Folder. If you do not copy over the rest of Mac OS X, it will not boot. So better to exclude Users and take everything else, then it is to try and pick and choose.
The other approach is to install a New Mac OS X, and then copy over the stuff you want from the home folder(s) and reinstall any apps you want. -
How to register add-on of edited system form in sap b1 9.0?.
Hi all,
I have a problem in SAP b1 9.0.
Actually I added one field of BPCode to Employee master data, so I want to register an add-on of that system form in SAP b1 9.0.
When I create file of .ard as we watch it in video of
Bryan Gomez
Creating and Registering SAP Add-on - YouTube it will be created correctly, But the problem is when I register that the file of .ard it gives error (Cannot create a file when that file already exists). Again when I create a file of .ard of any other User form it gives the same error (Cannot create a file when that file already exists).
But when I create and register the add-on of Hello World in Sample folder of SDK it will be registered correctly.
How can I solve that problem.
Anyone can help me please.Hi pallavi p,
That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
So let me give you the way you can try.
1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
2. Right click on your project
3. Add new item
4. Sap Business One
5. System form (Employee master data) or user form
6. Add
And then if your form is opened
7. Go to add the reference of UI API Version 9.0
8. Check errors found in menu.vb (or in OutPut)
So if it's possible try to solve that problem.
Please anyone can help me. -
How to add new fields to the system form (Ex.expenses to a/r invoice form)
hi
can any one tell me how to add new fields to the system form (Ex.expenses to a/r invoice form)
i want to add expenses field to system a/r invoice form and connect data base also.
i used the code of samples\11.system form manipulation(vb.net) but i'm not able to get it....so can any one help with code or concepts.
reply soon plz..
thankQIf I understood you correctly, you are just trying to add new fields to the invoice form and then use them in your form. you should first go and add the field to your tables, which you would do by going to Tool --> User Defined Fields --> Manage User Fields. There are different documents or categories given. For ex. for invoices, Sales Orders you would add your field under the Marketing Documents. If you want the field to be just one per invoice, add it to the Title, otherwise if you want a field per invoice or Sales Order line, add it to the Rows section. Once you have done that then you can just create a edit box or drop down to represent the field and set the datasource for that to your field. If you want example code to do that, let me know.
-
Updating a user text field in sap system form in Find Mode
Dear All,
I created a Edit text field in Sap System form [FormType :149] -Sales Quotation. I want to update a value to the text while clicking OK button in Find Mode. the code is given below.
If pVal.ItemUID = "1" And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE And (Not pVal.Before_Action) And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
oForm = SBO_App.Forms.Item(FormUID)
oForm.Freeze(True)
oItem = oForm.Items.Item("txtUID")
oEdit = oItem.Specific
oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
oItem = oForm.Items.Item("txtCampgn") ' // User created field
oItem.Enabled = False
oEdit = oItem.Specific
If oRS.EOF = False Then
oEdit.Value = oRS.Fields("CMNAME").Value
Else
oEdit.Value = ""
End If
end if
while clicking the OK button, Based on the value fetched on the screen, I have to open a recordset and get the value. But, the screen loads the value to the system textboxes. I could not get those value to run the Sql in the event. it returns empty. Could any one help please how to solve this ?
Thanks in advance.
Manikandan.Hi,
Try This..
If pVal.FormType = 149 And pVal.ItemUID = "1" Then
If pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
If pVal.Before_Action = False Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
Try
oForm = SBO_App.Forms.Item(FormUID)
oForm.Freeze(True)
oItem = oForm.Items.Item("txtUID")
oEdit = oItem.Specific
oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
oItem = oForm.Items.Item("txtCampgn") ' // User created field
oItem.Enabled = False
oEdit = oItem.Specific
If oRS.EOF = False Then
oEdit.Value = oRS.Fields("CMNAME").Value
Else
oEdit.Value = ""
End If
Catch ex As Exception
SBO_application.MessageBox(ex.Message)
End Try
End If
End If
End If
End If
Best Regards,
Mahendra -
Form Settings getting cleared for system form
Hi All,
I have added the code for setting editable=false for the following items in Updatemode and Ok mode.Then in add mode,i made the columns to editable = true .First time it is working fine.
the next time, I got the error message as "item is not a user defined item" on ItemCodeCol.editable = true.Then i check the form settings, the Active field for the itemcode cleared.When i set to Active as checked and run my code,it is working fine.How to solve the issue and how to avoid the setting of the fields.
This is my code :
If oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
oSQItemCodeCol.Editable = True
oSQItemNameCol.Editable = True
oSQQtyCol.Editable = True
oSQWhsCodeCol.Editable = True
ElseIf oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Or oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then
oSQItemCodeCol.Editable = False
oSQItemNameCol.Editable = False
oSQQtyCol.Editable = False
oSQWhsCodeCol.Editable = False
End If
Thanx in advance
Regards
Mohana
Edited by: Mohana Annadurai on Feb 20, 2009 5:28 AMHi,
This is not UDF in system form.That is , the itemcode,itemname,qty,warehouse field in the content tab of the sales quotation form.when i change the field to editable and noneditable,
1)it is allowing to set the editable property to false and true for the first time.
2) After adding the record,i navigate the record to check ,at that time,as per my code,in update mode,it is not allowing to edit.
3)When i click add menu,and i chose customer, at that time it is not allowing to add a itemcode,becoz the itemcode field is disabled.
4)when i check in form settings, in Table format, Active gets unchecked for the above fields.
5)I want to avoid this changing of active in form settings.How to to this...
Regards
Mohana -
Is it possible to get System form Matrix Data in DI API?
HI,
i would like to use DI API to get the System Form Matrix ( like Sale Order ) . Is it possible?
i know that using UI API is most easier way. However, UI API cause extermemly slow perfomance.
no matter i use Form.Freeze or not. Please Advise
Thanks
Gordon
Edited by: Gordon Ho on May 7, 2009 7:03 AMHi,
U can access the Sales Order rows using the DI only if its added to the system. U can use the DOCUMENT object and Document.Lines and access the row data. Please check the SDK help file for more information.
From SDK Help
Document_Lines is a child object of Documents object and represents the line entries of a document in the Marketing Documents and Receipts module and the Inventory and Production module.
Vasu Natari. -
Opening a System-Form with selected Data
Hi,
i´m looking for a way to open a System-Form, e.g. Orders with
selected Data.
In the moment i do the following:
application.ActivateMenuItem("2050"); // orders
SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
belegForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
SAPbouiCOM.EditText edDocNum = (SAPbouiCOM.EditText)belegForm.Items.Item("8").Specific;
edDocNum.Value = "4711";
belegForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
This works, but the screen is blinking, because first the form ist opened and shown with
empty values and then filled.
Is there a way to activate the form and do the search-Operation and afterwards show it ?
I think ist must be possible, because when clicking on the link-Button near CardCode, the Contacts-Form
is opened in this way.
regards MatthiasHi Ibai,
i have tested both: freeze and form.visible = false in
the form_load-Event. It doesn´t work here.
Also neither the call
application.ActivateMenuItem("1281"); // find
nor the call
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
work in the form_load-Event.
After the form-Load-Event the et_FORM_ACTIVATE-Event is called.
Here the functions work, but here the screen is already visible.
regards Matthias
Maybe you are looking for
-
Relatório saldo de contas contrapartida
Bom dia, Gostaria de saber se é possível obter um relatório que ao ser introduzido uma conta do razão nos critérios de selecção, e após execução, devolveria o saldo das contas movimentadas em contrapartida dessa mesma conta inicialmente introduzida (
-
RFC Connection From SAP to Iseries server
Hi, I wish you can help me wtih this issue. We are running ECC 6.0 on iseries v5r3m0. We are trying to connect to an other non-SAP V5r1M0 system. We are using OSS note 146624 for this purpose. Our first problem is that we cannot copy pgm files to a V
-
In Process Inspection for Repetitive Manufacturing
Hi All, I'm trying to perform in-process inspection for repetitive manufacturing. I have a semi finished material which has the inspection type 13 activated in the material master. Rate routing for it has also been created. Characteristics have been
-
Why is the template binding not refreshing?
I made this itemtemplate for a combobox: <DataTemplate x:Key="EO_CategoryItemTemplate"> <Grid> <Line Stroke="Gray" StrokeThickness="1" VerticalAlignment="Center" X1="0" X2="{Binding ActualWidth, ElementName=cat1}" Visibility="{Binding Active, Convert
-
Hi! I finally decided to switch to Apple and purchased an iMac. I take a lot of photos and occasionally get paid for doing so. I used Photoshop on my old computer, so of course I purchased the Mac version. The problem I am having is that all my p