Skip to Content
author's profile photo Former Member
Former Member

Creating UDO Object

Hello,

I'm trying to create with UserObjectsMD, but the method failes with the message [OUDO.TableName], 'tablename'

the name my usertable is TCONDUC. I have try asign : TCONDUC, @TCONDUC and [@TCONDU] , but the method failes.

the code is :

oUDO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)

oUDO.Code = "CodeUDO"

oUDO.Name = "Prueba"

oUDO.TableName = "TCONDUC"

oUDO.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData

oUDO.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES

oUDO.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES

oUDO.CanClose = SAPbobsCOM.BoYesNoEnum.tYES

oUDO.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES

oUDO.CanLog = SAPbobsCOM.BoYesNoEnum.tYES

oUDO.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES

With oUDO.FormColumns

.FormColumnAlias = "Code"

.FormColumnDescription = "Codigo"

.Add()

.FormColumnAlias = "Name"

.FormColumnDescription = "DEscripcion"

.Add()

.FormColumnAlias = "U_Telefono"

.FormColumnDescription = "Telefono"

.Add()

End With

'Creacion del Objeto

lRetCode = oUDO.Add() -> here Failed

If lRetCode <> 0 Then

oCompany.GetLastError(lRetCode, sErrMsg)

MessageBox.Show(sErrMsg, "Error")

Exit Sub

End If

Jose Antonio.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 29, 2004 at 01:08 PM

    The correct syntax for the table name is "@TCONDUC".

    Is the table you have created (TCONDUC) of type MasterData?

    To verify everything about your table you can try to use the UDO Wizard to create a UDO with your table. If your table doesn't appear as possible tables to create a UDO of type MasterData then the problem comes from your table type.

    Saludos

    Trinidad.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 29, 2004 at 01:34 PM

    Hi Trinidad,

    I try to use the UDO Wizard , but doesn't appear none as possible tables . I have more 20 tables created (many were with the database) .

    I had created the table by code, and the table type is nothing.

    Thanks for all.

    Add a comment
    10|10000 characters needed characters exceeded

    • If your table is of type nothing you cannot create a UDO using this table.

      You must create your table of the same type of the UDO you want to create with (you must specify the type when you create the table to be used with UDO).

      So the table you attach to the UDO object should be of the UDO object type:

      If it is a boud_MasterData UDO object the table should be of type Master Data

      If it is a boud_Document UDO object the table should be of type Document

      Saludos

      Trinidad.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.