Error with DataObjects - InfoPath Dev
in

InfoPath Dev

Error with DataObjects

Last post 04-11-2006 07:01 AM by anotherchrisberry. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-10-2006 03:26 AM

    Error with DataObjects

    Hi,
    Since I needed to get user's information from my Sharepoint, I use a SP's web service. I write the following code:

    Function GetNameFromCID(CID)
    Dim theDataObject
    theDataObject = XDocument.DataObjects("DataSourceWithWebS").DOM theDataObject.setProperty "SelectionNamespaces", "..."
    theDataObject.selectSingleNode("//s0:AccountName").text = CID
    XDocument.DataObjects.Item("GetUserProfileByName").Query()
    return theDataObject.selectSingleNode("/dfs:myFields/dfs:dataFields/s0:GetUserProfileByNameResponse/s0:GetUserProfileByNameResult/s0:PropertyData/s0:Value[../s0:Name = ""PreferredName""]").text
    End Function


    When I open a form, here's my error "Object doesn't support this property or method" at this line:
    theDataObject = XDocument.DataObjects("DataSourceWithWebS").DOM

    I don't know why....
  • 04-10-2006 02:20 PM In reply to

    Is this helpful?

    http://weblogs.asp.net/jan/archive/2004/03/16/90533.aspx

    I have used this method in conjunction with WScript.Network to get the user's ID...
  • 04-10-2006 11:20 PM In reply to

    Hi,
    my problem is that the following line:

    theDataObject = XDocument.DataObjects("DataSource").DOM


    gives me the error...I don't know why....
  • 04-11-2006 07:01 AM In reply to

    Are you coding in JScript? If so, "dim" should be "var". But other than that, I'm probably not the one to answer this.. Sorry.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.