cancel
Showing results for 
Search instead for 
Did you mean: 

Sap business one

Former Member
0 Kudos

How to dynamically unregister the udo in sap bussiness one

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

If you about code, when:



Private Function UDO_Unreg(ByVal sCode As String) As Boolean
  Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
  Dim b As Boolean = True
  Try
    Dim lErrCode As Long = 0
    Dim sErrMsg As String = ""

    oUserObjectMD = SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)

    If oUserObjectMD.GetByKey(sCode) Then
      lErrCode = oUserObjectMD.Remove()
    End If
    If lErrCode <> 0 Then b = False
  catch ex As Exception
    ' log exception
    b = False
  finally
    oUserObjectMD = Nothing
  end try
End Function

BR

Sierdnas

Answers (0)