Avalados por :

Eliminación de líneas de tabla UDO documento a través del objeto DI: ¿Es posible cancelar una línea?

  • Creado 01/03/2024
  • Modificado 01/03/2024
  • 2 Vistas
0
Cargando...

¿Es posible eliminar o cancelar una línea de una tabla UDO documento mediante el objeto DI?

Pedro Pascal
Se unió el 07/03/2018
Pinterest
Telegram
Linkedin
Whatsapp

4 Respuestas

0
Cargando...

Muchas gracias.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Sergio,

Instantiate the UDO you need to work with


        Dim oCompanyService As SAPbobsCOM.CompanyService = oCompany.GetCompanyService
        Dim oGeneralService As SAPbobsCOM.GeneralService = oCompanyService.GetGeneralService("TABLE_HEADER")
        Dim oGeneralData As SAPbobsCOM.GeneralData = oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralData)
        Dim oGeneralChildren As SAPbobsCOM.GeneralDataCollection
        Dim oGeneralParams As SAPbobsCOM.GeneralDataParams = oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)

...
                    oGeneralParams.SetProperty("DocEntry", "100001")  ' 100001 is the document number
                    oGeneralData = oGeneralService.GetByParams(oGeneralParams) 'Retrieve the object to memory
                    oGeneralChildren = oGeneralData.Child("TABLE_ROWS")
                    For i As Integer = 1 To oGeneralChildren.Count
                        oGeneralChildren.Remove(0) ' Remove all the rows.
                    Next
                    oGeneralService.Update(oGeneralData) 'Update the object.
...

Regards,

Vítor Vieira

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Hola, ¿puedes enviarme un ejemplo para replicarlo? Estoy un poco perdido.

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019
0
Cargando...

Hola Sergio,

Esto es un foro en inglés.

Sí, es posible. Tienes ejemplos en el archivo de ayuda del SDK.

Saludos,

Vítor Vieira

Respondido el 15/04/2024
LUCIANO RIOJA GHIOTTO
Se unió el 13/07/2019

contacto@primeinstitute.com

(+51) 1641 9379
(+57) 1489 6964

© 2024 Copyright. Todos los derechos reservados.

Desarrollado por Prime Institute

¡Hola! Soy Diana, asesora académica de Prime Institute, indícame en que curso estas interesado, saludos!
Hola ¿Puedo ayudarte?