dotnetspider.com Home page     All Communities

SAP Business One


How to Check whether UserTable or UserDefined Object Exists ?



My Profile 
  • Sign In
  •  
  • Register

  • Links 
  • Message Center
  •  
  • File Manager
  •  
  • Members
  •  
  • Hall Of Fame
  •  
  • Site Configuration





  • How to Check whether UserTable or UserDefined Object Exists ?


    Posted Date: 01 May 2010      Total Responses: 0

    Posted By: rengan       Member Level: Bronze     Points: 1


    Public Function IsExists(ByVal objname As Object, ByVal pnnStrName As String) As Boolean

    Dim bnnBolReturnCode As Boolean

    Try
    bnnBolReturnCode = objname.GetByKey(pnnStrName)
    Return bnnBolReturnCode

    Catch Ex As Exception
    objAppApplication.MessageBox(Ex.Message)

    Finally
    System.Runtime.InteropServices.Marshal.ReleaseComObject(objname)
    ponValObjectvalue = Nothing
    GC.Collect()

    End Try

    End Function
    You can call the above function like this

    IsExists(objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables), "TableName")






    Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Post Reply
    You must Sign In to post a response.
    Next : How to load image to Menu
    Previous : How to add new row to matrix?
    Return to Discussion Forum
    Post New Message
    Category:

    Related Messages