Prevent adding udo by bubbleevent
hi,
i want to prevent to add the udo document by using bubbleevent=true
Private Sub moSboApplication_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles moSboApplication.FormDataEvent
Select Case BusinessObjectInfo.EventType
Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD
If BusinessObjectInfo.FormTypeEx = "FrmSeparate" And BusinessObjectInfo.ActionSuccess = False Then
oForm = moSboApplication.Forms.Item(BusinessObjectInfo.FormUID)
If gocSeparate.book(oForm) = False Then
BubbleEvent = True 'error happened, do not save udo now
End If
End If
If BusinessObjectInfo.FormTypeEx = "FrmSeparate" And BusinessObjectInfo.ActionSuccess = True Then
'UDO is added, so write docnums into documents purchase invoice, goods issue, goods receipt
gocSeparate.writeDocnumInDocuments()
End If
the bubbleevent=true is set (i checked it with my debugger), but it doesen't interest the sap-system, because the debugger is afterwards jumping to my second if-Block actionsuccess=true. The document (udo) is added.
quit a simple mistake:
i have to set the bubbleevent=false
Similar Messages
-
Hi All,
How to prevent adding components while goods issue in a maintenance order.
Thanks in advance
SuryaHi Gurus
Still trying to explore on it.
What is the consequence if I uncheck the box UNPLANNED GOODS ISSUE in the IMG activity for Define Documentation for Goods movements for the Order?
Path: SPRO>PMCS>Maintenance and Service processing>Maintenance and Service Orders>Functions and settings for Order types>Goods movements for order>Define Documentation for Goods movements for the orders.
Thanks in advance
Surya -
Do parental controls prevent adding a mail account
We have engaged the parental controls for our daughter on her ibook. We needed to add her email account to the mail program, but when we opened the mail program under her account the program seemed to simply crash. We could only add her email through the parental/admin account. Does anyone know if the parental controls prevent the adding of an email address through the non-admin account?
I have now added my old password tothe outgoing mail server and I can send emails from my iphone mail account!
My mail account on the Iphone connects with my laptop account but they are both logged in on different passwords! how can this happen?
Thank you -
Hi,
Im using SAP B1 2007A SP00 PL11
I'm getting the following error when attempting to add data using a custom form bound to a UDO.
"Internal Error (3621) occured [Message 131-183]"
The form was generated using the B1DE form generator and is a Document / Document Lines type form.
The error is caused by a specific value in one of the fields in the Document Lines section. If I use another value it works correctly.
Any info on what error 3621 is would be appreciated.
Cheers,
BenBen,
The latest patch level for 2007A is PL 15 ... you may want to download and retry your code.
Eddy -
Help in adding UDO Form to Project
Hi all,
I need some help with calling a UDO form in VB.Net
I have created a new project in VB.NET
I have created a UDo through Object Registration wizead.
I also create a form through UDO form generator.
Since I am new to SAp I want to know how do i call this form into my project.
I have already created a menu event and on its click I write the folwing code
Dim SBO_Application As SAPbouiCOM.Application
Dim oXmlDoc As Xml.XmlDocument
oXmlDoc = New Xml.XmlDocument
'// load the content of the XML File
oXmlDoc.Load("C:\XXX_NEW\poc\form\" + "XXX_POC_MASTERForm.xml")
'// load the form to the SBO application in one batch
SBO_Application.LoadBatchActions("oXmlDoc.XML")
However the above line throws error
Can someone please tell me what shoud I be doing to make it work
thanks DibakarHi Dibakar,
You should change the last line of your code from
SBO_Application.LoadBatchActions("oXmlDoc.XML")
to
SBO_Application.LoadBatchActions(oXmlDoc.XML)
There should not be quotation marks around the variable with the XML values in it as the SDK then interprets it as a string.
Hope it helps,
Adele -
Prevent Adding AR Invoice twice
i got a problem Adding A/R Invoice from Draft Document, i need to check wether the A/R Draft U_InvoiceCode(UDF) already exist in AR Invoice, if it is then user can't added again
my colleague said something about SBO_SP_TransactionNotification but i'm blank about it
any idea?
thanks,
erickErick,
add into trasactnotification stored procedure lines
if @object_type = '13' and @transaction_type= 'A'
begin
if 1 < (select count(docentry) from oinv with(nolock) where U_InvoiceCode = (select top 1 U_InvoiceCode from oinv where docentry =@list_of_cols_val_tab_del)
begin
select @error =1
select @error_message = 'Duplication of invoice.'
end
end
hope it helps
Petr -
Adding Default Form while Registrasion of UDO
Hi....
I am facing problem while registering UDO using some VB.Net code.
the SAP shows object registed successfully.but
it doesn't create the default form.
Sample Code....
oUserObjectMD.Code = "AssetType"
oUserObjectMD.Name = "ASSET TYPE UDO"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
oUserObjectMD.TableName ="AssetTable"
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.FindColumns.ColumnAlias = "Code"
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FormColumns.FormColumnAlias = "Code"
oUserObjectMD.FormColumns.FormColumnDescription = "Code"
oUserObjectMD.FormColumns.Add()
oUserObjectMD.FormColumns.FormColumnAlias = "U_AssType" oUserObjectMD.FormColumns.FormColumnDescription = "Asset Type"
oUserObjectMD.FormColumns.Add()
oUserObjectMD.FormColumns.FormColumnAlias = "U_AssName" oUserObjectMD.FormColumns.FormColumnDescription = "Asset Name"
oUserObjectMD.FormColumns.Add()
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
muc_ParentAddon.SBO_Company.GetLastError(ErrCode, ErrMsg)
muc_ParentAddon.SBO_Application.MessageBox("Error Adding UDO's - " & mst_ErrNumber & ErrMsg) ', SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End If
End If
UDO is Adding But I Am not getting Default Form.
Please Help....Dear Nageswar Venkat,
It seems like a sdk bug.
You could update the UDO in B1 client then the Default Form will appear.
Best Regards
Jane Jing
SAP Business One forums team -
Prevent from adding or Remove/Hide Property Pages in Settings
Hello,
I'm including 3rd party plugins in my RCP Application. Unfortunately these plugins add Property Pages to my Settings.
how can i remove or hide these pages. or how can i configure Eclipse
to prevent adding them (something like a filter)?
thanks in advance!
PS: i use default settings for the 3rd party plugins and the user should not be flooded with too much. therefore a clean menue would be preferredYou can't do that easily - I'm not sure if activities apply to
preference pages but I found this
http://stackoverflow.com/questions/1460761/howto-hide-a-preference-page-in-an-eclipse-rcp
where they are removing the preference pages the hard way!
The ideal thing would be if you upstream dep would move the preference
stuff in an extra plugin so that you have:
* ...my.bundle
* ...my.bundle.preferences
or even better
* ...my.bundle
=> here is the implementations of views, preference pages, ...
* ...my.bundle.wbcontrib
=> here are the contributions they are making to the workbench (the
plugin.xml)
Tom
On 08.07.15 16:07, Ludwig Moser wrote:
> Hello,
>
> I'm including 3rd party plugins in my RCP Application. Unfortunately
> these plugins add Property Pages to my Settings.
>
> how can i remove or hide these pages. or how can i configure Eclipse to
> prevent adding them?
>
>
> thanks in advance!
>
> PS: i use default settings for the 3rd party plugins and the user should
> not be flooded with too much. therefore a clean menue would be preferred -
Complete Exemple of UDO in this Post
Hi,
There are a lot of question about UDO, here is a complete example. It will create the tables, the UDO and the form.
I don't know how to make the application to be download from this SND website, so I can only give you the code.
I know it's quite difficult to read because of the space...
You just have to create a new application in VB.Net.
Add a VB form called MasterDataUDO.vb and past the code. Add the reference to the UI and DI
Sebastien
Option Strict Off
Option Explicit On
Public Class MasterDataUDO
Inherits System.Windows.Forms.Form
Private WithEvents oApplication As SAPbouiCOM.Application
Private oCompany As SAPbobsCOM.Company
Private oForm As SAPbouiCOM.Form
Private ErrMsg As String
Private ErrNumber As Int16
Private Const UDOName = "MasterEssai"
#Region " creation of Windows Form "
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents cmdCreateUDO As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.cmdCreateUDO = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'cmdCreateUDO
Me.cmdCreateUDO.Location = New System.Drawing.Point(56, 24)
Me.cmdCreateUDO.Name = "cmdCreateUDO"
Me.cmdCreateUDO.Size = New System.Drawing.Size(152, 32)
Me.cmdCreateUDO.TabIndex = 1
Me.cmdCreateUDO.Text = "Create Table and UDO"
'Button1
Me.Button1.Location = New System.Drawing.Point(56, 104)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(152, 32)
Me.Button1.TabIndex = 2
Me.Button1.Text = "Create Form in BO"
'MasterDataUDO
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(288, 222)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.cmdCreateUDO)
Me.Name = "MasterDataUDO"
Me.Text = "MasterDataUDO"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub MasterDataUDO_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If SetApplication() = False Then
Application.Exit()
End If
End Sub
Private Function SetApplication() As Boolean
Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim strConnectionString As String
Dim strCookie As String
Dim strConnectionContext As String
Try
' connect to the application
SboGuiApi = New SAPbouiCOM.SboGuiApi
strConnectionString = "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056"
SboGuiApi.Connect(strConnectionString)
oApplication = SboGuiApi.GetApplication()
Catch ex As Exception
MsgBox(ex.ToString)
Return False
Exit Function
End Try
' connect to the company
oCompany = New SAPbobsCOM.Company
strCookie = oCompany.GetContextCookie
strConnectionContext = oApplication.Company.GetConnectionContext(strCookie)
oCompany.SetSboLoginContext(strConnectionContext)
If oCompany.Connect <> 0 Then
MsgBox("error connecting to SBO")
Return False
Else
Return True
End If
End Function
Private Sub cmdCreateUDO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCreateUDO.Click
If AddTables() = False Then
Exit Sub
End If
If Addfield() = False Then
Exit Sub
End If
If AddUDO() = False Then
Exit Sub
End If
MsgBox("Tables and Fields Added." & vbCrLf & "Please check in your opened Businnes Application to see if any message box is active before continu.", MsgBoxStyle.OKOnly)
End Sub
#Region "Add Tables, Fields and UDO"
Private Function AddTables() As Boolean
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
'Adding Master Data Table
If Not oUserTablesMD.GetByKey("MRO_MA") Then
oUserTablesMD.TableName = "MRO_MA"
oUserTablesMD.TableDescription = "Master Data example"
oUserTablesMD.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterData
If oUserTablesMD.Add <> 0 Then
oCompany.GetLastError(ErrNumber, ErrMsg)
MsgBox("Error Adding Table Master Data" & vbCrLf & ErrMsg, MsgBoxStyle.Critical)
Return False
Exit Function
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
'Adding Master Data Child 1 Table
oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
If Not oUserTablesMD.GetByKey("MRO_MA_1") Then
oUserTablesMD.TableName = "MRO_MA_1"
oUserTablesMD.TableDescription = "Master Data Child 1 example"
oCompany.GetLastError(ErrNumber, ErrMsg)
oUserTablesMD.TableType = SAPbobsCOM.BoUTBTableType.bott_MasterDataLines
If oUserTablesMD.Add <> 0 Then
MsgBox("Error Adding Table Master Data Line 1" & vbCrLf & ErrMsg, MsgBoxStyle.Critical)
Return False
Exit Function
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
Return True
End Function
Private Function Addfield() As Boolean
Dim oUserFieldMD As SAPbobsCOM.UserFieldsMD
oUserFieldMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
'One field in tablle @MRO_MA_1
If Not oUserFieldMD.GetByKey("@MRO_MA_1", 0) Then
oUserFieldMD.Description = "Item Code"
oUserFieldMD.Name = "itemCode"
oUserFieldMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
oUserFieldMD.TableName = "MRO_MA_1"
oUserFieldMD.Size = 25
If oUserFieldMD.Add <> 0 Then
oCompany.GetLastError(ErrNumber, ErrMsg)
MsgBox("Error Adding Field Item Code in Master Data Child 1" & vbCrLf & ErrMsg, MsgBoxStyle.Critical)
Return False
Exit Function
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldMD)
Return True
End Function
Private Function AddUDO() As Boolean
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
If oUserObjectMD.GetByKey(UDOName) = 0 Then
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
'oUserObjectMD.FormColumns
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.FindColumns.ColumnAlias = "Code"
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FindColumns.SetCurrentLine(1)
oUserObjectMD.FindColumns.ColumnAlias = "Name"
oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.LogTableName = ""
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.ChildTables.TableName = "MRO_MA_1"
oUserObjectMD.ExtensionName = ""
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.Code = UDOName
oUserObjectMD.Name = "Essai Master Data"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
oUserObjectMD.TableName = "MRO_MA"
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
oCompany.GetLastError(ErrCode, ErrMsg)
MsgBox("Errorf adding UDO master Data" & vbCrLf & ErrMsg)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return True
End Function
#End Region
#Region "Create Form"
Private Sub cmdForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oCreatioParams As SAPbouiCOM.FormCreationParams
Dim oItem As SAPbouiCOM.Item
Dim oLabel As SAPbouiCOM.StaticText
Dim oMatrix As SAPbouiCOM.Matrix
Dim oColumns As SAPbouiCOM.Columns
Dim oColumn As SAPbouiCOM.Column
Dim oEdit As SAPbouiCOM.EditText
Dim oButton As SAPbouiCOM.Button
Dim oFolder As SAPbouiCOM.Folder
Dim oLink As SAPbouiCOM.LinkedButton
Dim oCombo As SAPbouiCOM.ComboBox
oCreatioParams = oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
oCreatioParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
oCreatioParams.FormType = "MRO_0001"
oCreatioParams.ObjectType = UDOName
oCreatioParams.UniqueID = GetUniqueID()
Try
oForm = oApplication.Forms.AddEx(oCreatioParams)
oForm.Title = "UDO Master Data test"
oForm.Height = 300
oForm.Width = 350
oForm.ClientHeight = 300
' Adding DBDataSources
oForm.DataSources.UserDataSources.Add("US_1", SAPbouiCOM.BoDataType.dt_SHORT_NUMBER, 1)
'// Adding an Ok button
oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 5
oItem.Width = 65
oItem.Top = 270
oItem.Height = 19
oButton = oItem.Specific
'oButton.Caption = "Ok"
'// Adding a Cancel button
oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 75
oItem.Width = 65
oItem.Top = 270
oItem.Height = 19
oButton = oItem.Specific
'oButton.Caption = "Cancel"
' Adding text box linked to Code field
oItem = oForm.Items.Add("txtCode", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oItem.Left = 60
oItem.Top = 6
oItem.Width = 40
oEdit = oItem.Specific
oEdit.DataBind.SetBound(True, "@MRO_MA", "code")
' Adding label
oItem = oForm.Items.Add("lblCode", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oItem.Left = 6
oItem.Top = 6
oItem.Width = 40
oItem.LinkTo = "txtCode"
oLabel = oItem.Specific
oLabel.Caption = "Code"
' Adding text box linked to Name field
oItem = oForm.Items.Add("txtName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oItem.Left = 220
oItem.Top = 6
oItem.Width = 100
oEdit = oItem.Specific
oEdit.DataBind.SetBound(True, "@MRO_MA", "Name")
' Adding label
oItem = oForm.Items.Add("lblName", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oItem.Left = 160
oItem.Top = 6
oItem.Width = 60
oItem.LinkTo = "txtName"
oLabel = oItem.Specific
oLabel.Caption = "Description"
'Adding the Panes
oItem = oForm.Items.Add("Folder1", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
oItem.Left = 10
oItem.Width = 100
oItem.Top = 30
oItem.Height = 19
oItem.AffectsFormMode = False
oFolder = oItem.Specific
'// set the caption
oFolder.Caption = "Items"
oFolder.DataBind.SetBound(True, "", "US_1")
oFolder.ValOff = 0
oFolder.ValOn = 1
oItem = oForm.Items.Add("Folder2", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
oItem.Left = 120
oItem.Width = 100
oItem.Top = 30
oItem.Height = 19
oItem.AffectsFormMode = False
oFolder = oItem.Specific
'// set the caption
oFolder.Caption = "Designation"
oFolder.DataBind.SetBound(True, "", "US_1")
oFolder.GroupWith("Folder1")
oFolder.ValOff = 0
oFolder.ValOn = 2
'// Adding a Rectangle Item for the Pane
oItem = oForm.Items.Add("Rect1", SAPbouiCOM.BoFormItemTypes.it_RECTANGLE)
oItem.Left = 2
oItem.Width = 330
oItem.Top = 49
oItem.Height = 215
'Adding the Matrix in Pane 1
oItem = oForm.Items.Add("ItemList", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
oItem.Left = 10
oItem.Width = 150
oItem.Top = 60
oItem.Height = 180
oItem.Description = ""
oItem.DisplayDesc = False
oItem.AffectsFormMode = True
oItem.FromPane = 1
oItem.ToPane = 1
oMatrix = oItem.Specific
oColumns = oMatrix.Columns
' col 1
oColumn = oColumns.Add("col_nb", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oColumn.TitleObject.Caption = "#"
oColumn.Width = 20
oColumn.Editable = False
oColumn.DataBind.SetBound(True, "@MRO_MA_1", "LineId")
' col 2, with linked button
oColumn = oColumns.Add("col_Item", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
oColumn.TitleObject.Caption = "Item"
oColumn.Width = 90
oColumn.DataBind.SetBound(True, "@MRO_MA_1", "U_itemCode")
'// Link the column to the BP master data system form
oLink = oColumn.ExtendedObject
oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
'Adding Button Add in Pane 1
oItem = oForm.Items.Add("cmdAdd_1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 180
oItem.Top = 90
oItem.FromPane = 1
oItem.ToPane = 1
oButton = oItem.Specific
oButton.Caption = "Add Item"
oButton.Type = SAPbouiCOM.BoButtonTypes.bt_Caption
'Adding Button Remove in Pane 1
oItem = oForm.Items.Add("cmdRem_1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem.Left = 180
oItem.Top = 115
oItem.FromPane = 1
oItem.ToPane = 1
oButton = oItem.Specific
oButton.Caption = "Remove Item"
oButton.Type = SAPbouiCOM.BoButtonTypes.bt_Caption
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
oForm.DataBrowser.BrowseBy = "txtCode"
oForm.PaneLevel = 1
oForm.Items.Item("Folder1").Click()
oForm.Visible = True
Catch ex As Exception
oApplication.MessageBox(ex.ToString)
End Try
End Sub
#End Region
#Region "Handle Event"
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
Dim oMatrix As SAPbouiCOM.Matrix, i As Int16
If FormUID Like "MRO_*" Then
oForm = oApplication.Forms.Item(FormUID)
If pVal.Before_Action = False Then
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED
'// Check if the event was raised by one of the Folder items
'// and change the form's pane level
Select Case pVal.ItemUID
Case "Folder1"
oForm.PaneLevel = 1
Case "Folder2"
oForm.PaneLevel = 2
Case "cmdAdd_1"
oForm.DataSources.DBDataSources.Item("@MRO_MA_1").Clear()
oMatrix = oForm.Items.Item("ItemList").Specific()
oMatrix.AddRow()
End Select
End Select
End If
End If
End Sub
#End Region
#Region "Miscelaneous functions"
Public Function GetUniqueID() As String
Dim NewForm As SAPbouiCOM.Form
Dim i As Int16
i = 0
Do
Try
NewForm = oApplication.Forms.Item("MRO_" & CStr(i))
Catch ex As Exception
'Error catch is the form does not exist
Return "MRO_" & CStr(i)
Exit Function
End Try
i += 1
If i > 100 Then
'just to be sure that the function will not run endless
MsgBox("Error finding UID for form", MsgBoxStyle.Critical)
Return "MRO_" & CStr(i)
Exit Function
End If
Loop
End Function
#End Region
End Class
Message was edited by: Sébastien Danober, to add the code BaliseFor delete a row:
' Definition: Delete a matrix row
' Algoritm :
' Notes :
' Parameters:
' Return :
Public Sub <b>DeleteRow</b>()
Try
If m_sboMatrix.RowCount = 0 Then
Exit Sub
End If
Dim l_iMatrixSelectedRow As Integer
For l_iMatrixSelectedRow = 1 To m_sboMatrix.RowCount
If m_sboMatrix.IsRowSelected(l_iMatrixSelectedRow) Then
Exit For
End If
Next
If l_iMatrixSelectedRow = m_sboMatrix.RowCount + 1 Then
' none row selected
Exit Sub
End If
If G_SboApp.MessageBox("Remove the row?", "1", "Yes", "No") = 2 Then
Exit Sub
End If
Dim l_bStop As Boolean
RaiseEvent OnBeforeDeleteRow(l_iMatrixSelectedRow, l_bStop)
If l_bStop Then
Exit Sub
End If
m_sboMatrix.DeleteRow(l_iMatrixSelectedRow)
' set the form as modify, then the user click 'Save' and remove the line
If m_sboForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE And m_sboForm.Mode <> SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then
m_sboForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
RaiseEvent OnAfterDeleteRow()
Catch ex As Exception
ShowError(ex)
End Try
End Sub
Andrea -
Security settings on this doc prevent signing
I created a form with interactive fields. 1) in security settings it says "no security" 2) under Advanced, I "enabled usage rights in Adobe Reader" 3) opening the pdf in Reader X I clicked on the "Sign" button at the top 4) I get the "The security settings on this document prevent adding text ...." pop up in the Sign Pane. 5) I checked the security properties in Reader and it shows everything is allowed. ?????
First, what is a digital signature? It's a cryptographically sound operation that provides two important pieces of information. It takes a snap-shot of the document at signing time to provide a test of document integrity (if someone were to try and modify the snap-shot it would invalidate the digital signature), and it provides assurance that whomever signed the document is who they say they are.
The question you have to ask yourself is, do I need that kind of security? That is, do I need to ensure the signed portion of the document has not been modified, and is the person that signed the appropriate person for approving the document?
If you decide that yes, you need the security and assurances that a digital signature provides and you can't control what application the signer may be using (i.e. either Acrobat or Reader) then you need to enable the file to be signed in Reader (it can always be signed in Acrobat). In order to enable signing in Reader using Acrobat Pro 10.1.4 do the following:
Open the file you want to enable for signing
Select the File > Save As > Reader Extended PDF > Enable Additional Features menu item
Click the Save Now button on the Enable Usage Rights in Adobe Reader dialog
Supply a name and location and then click the Save button on the Save As dialog (note: you can save over the existing file)
Another question you have to ask yourself is do I care where the signature is placed on the PDF file? If you want to control the location of the signature appearance then you need to place the signature field as you noted above. On the other hand, if you don't care where the signature is placed then don't create a signature field and let the signer inscribe a signature field somewhere on the document at signing time. By the way, the document layout (placement of signature fields) should be finalized before you Reader Enable the file.
Steve -
UDO WITH MORE THAN ONE CHILD TABLE
Hello There.
Can I handle more than one child table for a master table by code?
if I can, how do I create this udo, I have tryed the following code, but it takes the last child table ("jobs7")
If oUserObjectMD.GetByKey("Jbs_UO") = 0 Then
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
'oUserObjectMD.FormColumns
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.FindColumns.ColumnAlias = "Code"
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FindColumns.SetCurrentLine(1)
oUserObjectMD.FindColumns.ColumnAlias = "Name"
oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.LogTableName = ""
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.ChildTables.TableName = "JOBS1"
oUserObjectMD.ChildTables.TableName = "JOBS2"
oUserObjectMD.ChildTables.TableName = "JOBS3"
oUserObjectMD.ChildTables.TableName = "JOBS4"
oUserObjectMD.ChildTables.TableName = "JOBS5"
oUserObjectMD.ChildTables.TableName = "JOBS6"
oUserObjectMD.ChildTables.TableName = "JOBS7"
oUserObjectMD.ExtensionName = ""
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.Code = "Jbs_UO"
oUserObjectMD.Name = "Jobs UDO"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
oUserObjectMD.TableName = "JOBS"
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
oCompany.GetLastError(ErrCode, ErrMsg)
MsgBox("Errorf adding UDO master Data" & vbCrLf & ErrMsg)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End If
End IfHi Hagai
after oUserObjectMD.ChildTables.TableName = "JOBS1"
just write
oUserObjectMD.ChildTables.Add
that would be
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.ChildTables.TableName = "JOBS1"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS2"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS3"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS4"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS5"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS6"
oUserObjectMD.ChildTables.Add
oUserObjectMD.ChildTables.TableName = "JOBS7" -
Hi
I m unable to do registration of UDO through code.
I m having two tables.1. U_UDOM(Master) and the second one is U_UDOC(Child). As i add my UDO, after assigning all properties it gives me error code(-<b>50002</b>). Can u help me regarding this error???
Also i want to know these properties of SAPbobsCOM.UserObjectsMD(i mean what values we should assign to these properties)
oUserObjectMD.Code = "EMPID";
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES;
oUserObjectMD.Name = "EMPNAME";Hi
I use this code in Vb.NET
' Definition: UDO
' Algoritm :
' Notes :
' Parameters: p_sFindColumnsList: lista delle colonne del find, separate da ';'
' p_sTableNamesList: lista delle tabelle dettaglio, separate da ';'
' Return :
Public Function AddUDO(ByVal p_sUDOCode As String, ByVal p_sUDOName As String, _
ByVal p_sTableNameTestata As String, ByVal p_enObjType As SAPbobsCOM.BoUDOObjType, _
ByVal p_sFindColumnsList As String, _
ByVal p_sTableNamesList As String, _
Optional ByVal p_CanYearTransfer As SAPbobsCOM.BoYesNoEnum = SAPbobsCOM.BoYesNoEnum.tNO, _
Optional ByVal p_CanLog As SAPbobsCOM.BoYesNoEnum = SAPbobsCOM.BoYesNoEnum.tNO) As Boolean
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
Try
oUserObjectMD = sboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
If oUserObjectMD.GetByKey(p_sUDOCode) = 0 Then
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
'oUserObjectMD.FormColumns
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
Dim l_vList() As String
Dim l_i As Integer
l_vList = Split(p_sFindColumnsList, ";")
For l_i = 0 To l_vList.Length - 1
If l_vList(l_i).Length > 0 Then
If l_i = 0 Then
oUserObjectMD.FindColumns.ColumnAlias = l_vList(l_i)
Else
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FindColumns.SetCurrentLine(l_i)
oUserObjectMD.FindColumns.ColumnAlias = l_vList(l_i)
End If
End If
Next
oUserObjectMD.CanLog = p_CanLog ' SAPbobsCOM.BoYesNoEnum.tNO
If oUserObjectMD.CanLog = tNO Then
oUserObjectMD.LogTableName = ""
Else
oUserObjectMD.LogTableName = "A" & p_sTableNameTestata
End If
oUserObjectMD.CanYearTransfer = p_CanYearTransfer
l_vList = Split(p_sTableNamesList, ";")
For l_i = 0 To l_vList.Length - 1
If l_vList(l_i).Length > 0 Then
If l_i = 0 Then
oUserObjectMD.ChildTables.TableName = l_vList(l_i)
Else
oUserObjectMD.ChildTables.Add()
oUserObjectMD.ChildTables.SetCurrentLine(l_i)
oUserObjectMD.ChildTables.TableName = l_vList(l_i)
End If
End If
Next
oUserObjectMD.ExtensionName = ""
If p_enObjType = BoUDOObjType.boud_Document Then
oUserObjectMD.ManageSeries = tYES
oUserObjectMD.CanLog = tYES
oUserObjectMD.LogTableName = "A" & p_sTableNameTestata
Else
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
End If
oUserObjectMD.Code = p_sUDOCode
oUserObjectMD.Name = p_sUDOName
oUserObjectMD.ObjectType = p_enObjType
oUserObjectMD.TableName = p_sTableNameTestata
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
sboCompany.GetLastError(ErrCode, ErrMsg)
CSetupError.AddError(CSetupError.enErrorType.enError_CreazioneUDO, "Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata, ErrMsg)
G_SboApp.SetStatusBarMessage("Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata & " - " & ErrMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
'MsgBox("Error adding UDO Data" & vbCrLf & ErrMsg)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return True
Catch ex As Exception
CSetupError.AddError(CSetupError.enErrorType.enError_CreazioneUDO, "Errore creazione UDO Data - " & p_sUDOName & " Tabella " & p_sTableNameTestata, ex.Message)
ShowError(ex)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
Return False
End Try
End Function
Andrea -
Captiave 2 - Adding Buttons to Question Slides
I need to use the Captivate Question Slide "maker" to create
interactive questions with navigation back to the "Jeopardy-esque"
main page. When doing so, the question slide maker prevents adding
buttons/navigation, etc.
Any work arounds, hints, suggestions?
Thanks...Hi Beta Bob and welcome to our community
As you have seen, you cannot insert interactive objects
(Buttons, Click Boxes or Text Entry Boxes) on Question slides.
The only workaround I can think of is to sort of simulate the
question slide using these objects on a standard slide.
Cheers... Rick -
Prevent Skype from merging contacts on Android?
Hello,
Does anyone know if there is a way to pevent Skype from merging its contacts into my Android contacts? It may be a useful feature but since there's no way to always map contacts correctly to existing ones and also that I simply don't want all of them in one place, I would like to know if I can prevent this behavior when I first install Skype on Android.
Currently I see no option to prevent adding Skype contacts on the first login and the problem is that Skype merges contacts at that point. If I go to its options and remove sync-ing contacts, the already merged ones aren't removed unless I uninstall Skype completely!
I would appreciate any help, thanks!I know this is an old post but this is a quite common and relevant topic with which I've spent sometime and would like to drop the solution, at least for Fedora 22 under KDE. In order to avoid skype to start at startup/login (which is quite annoying and a privacy invasion) I just deleted the file /etc/prelink.conf.d/skype.conf and that was it.(let's see if this post is up in the skype forum for long ?!)
-
Prevent duplicate songs in playlists?
How can I prevent adding songs to iPod playlists more than once? I would like to get an error message if I try to do it..Thanks
If you have a whole bunch of duplicates, and you think it will take too long to do by hand, I wrote a program that will help delete the duplicates. Go here:
http://home.comcast.net/~teridon73/itunesscripts/index.html
and click the download button. Extract the ZIP (teridonsitunesscripts.zip) somewhere, and run "teridonsitunesscripts.exe".
In the window that appears, select "itunesremoveduplicates" and click "Run Selected Script".
A new cmd prompt window will appear, listing all your playlists. Select whatever playlist you want (by number) and hit enter. The program will automatically remove the duplicate entries.
The forum TOS requires me to say: "I may receive some form of compensation, financial or otherwise, from my
recommendation or link" because I have a paypal donation link on my webpage, but the program is free
(donation totally optional)
HTH,
Rob
Maybe you are looking for
-
After upgrading to Yosemite, iphoto has a white symbol across it indicating it needs to be upgraded. When at the app store the install option is not available?
-
XSQL Using bind params with sql LIKE clause
I am unable to use a bind-param with the LIKE clause in a SELECT statement. eg call .../temp.xsql?name=N XSQL query is this: <xsql:query max-rows="-1" bind-params="name"> SELECT last_name FROM emp WHERE last_name LIKE '?%' </xsql:query> I have tried
-
Hello All,, I am a new bie user of Petstore demo application. After working around the code what i have found is a class 'orderapproval' sends the list of orders and order status to the customer relations which sends an email notice to each customer.
-
downloaded indesign cc and received configuration error 5 at launch. uninstalled. restarted computer. did a cc clean sweep. launch continues to error. adobe premier pro cc launches w out a problem. note: this is a 30 day trial.
-
Help with iPod installation...
I have an ipod 30g video. I have an iMac G5, all is well. Recently, I had my iMac's hard drive and logic board replaced. Just got it back today. I have heard from other people, when they got a new computer, the second the hooked the ipod up to it, it