Skip to Content
0
Dec 04, 2008 at 03:10 PM

Problem when retrive information with BusinessObject

56 Views

Hello to all!

I am developing an add-on and need to retrive information with the business object +ItemWarehouseInfo+.

Here is the line code:

Dim vItem1 As SAPbobsCOM.ItemWarehouseInfo = _

oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)

but give me an error. I don´t know why.

Message Error:

Se detectó System.InvalidCastException

Message="No se puede convertir el objeto COM del tipo 'System.__ComObject' al tipo de interfaz 'SAPbobsCOM.ItemWarehouseInfo'. Ocurrió un error de operación debido a que la llamada QueryInterface en el componente COM para la interfaz con IID '{CDB52791-B0FC-4BE1-A712-06941AF91D52}' generó el siguiente error: Interfaz no compatible (Excepción de HRESULT: 0x80004002 (E_NOINTERFACE))."

Source="IBOLT"

StackTrace:

en IBOLT.IBOLT.SBO_Application_ItemEvent(String FormUID, ItemEvent& pVal, Boolean& BubbleEvent) en C:AppWinsIBOLTIBOLTIBOLT.vb:línea 167

Somebody can help me with this?

Kind Regards

Giuseppe