Problems with the IWEB codes - ISurvey

Nov 30, 2008 at 1:47 PM
Hello there!
I follow closely and carefully the codes of the example, ISurvey in your help on how to extend IWEB on my custom modules. I changed some of the variables to be tested on my project instead. However, i faced problems with error messages telling me: Type 'List' is not defined.   

    Public Function GetInvInfo() As List(Of InventoryInfo)
    Dim InventoryInfolist As List(Of InventoryInfo) = New List(Of InventoryInfo)
    Dim objIWebAuthendication As New IWebAuthendication(IWebCredentials)

May I know if there is a need to import from some method or declare it?
Thank you so much.

Nov 30, 2008 at 10:45 PM
You probably want to write it like:

Dim InventoryInfolist As New List(Of InventoryInfo)
Dec 1, 2008 at 9:55 AM
Hi, oh I imported

Imports System.Collections.Generic and it works! = )

I have another problem here, I'm going to write my own web service as in those typical web services.
however, i do not want to write it in the way as the ISurvey example .
Is it possible?





Dec 1, 2008 at 1:33 PM
Yes it is.
Dec 2, 2008 at 1:53 AM
Okie, I have a sample code that look like this but it cannot work and display error message,object reference to null:





Function GetInventoryItemInfo(ByVal ItemCodeFrm As String, ByVal ItemCodeTo As String, ByVal ddlWhsCode As String, ByVal txtProductGrp As String) As DataSet





SetConnParam("123", "manager", "manager", "1234", "1234")



'get blank dataset


dsItem = DefineBlankDataset()


'declare which datatable


dtInvHeader = dsItem.Tables(




If ConnectToDatabase() Then



'initialize the coy object.


oCompany = Session(



oRecSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)


'before searching check if item, product group and warehouse exist:



' If isItemExist(ItemCodeFrm, ItemCodeTo) And IsProductGrpExist(txtProductGrp) And IsWarehouseExist(ddlWhsCode) = True Then



'Retrieve all items, FIELDS ARE EMPTY:



If ItemCodeFrm = "" And ItemCodeTo = "" And ddlWhsCode = "" And txtProductGrp = "" Then




I tried to debug and when the debugger reaches the bold line, it displays error.. May I know what has happened?

I meant typical web service is the above I have wrote,

Dec 2, 2008 at 2:25 AM
I can't imagine what is not working. I do not think it has anything to do with IWeb.