InfoPath cannot create a new blank form

O

OMAF-Terry

Detailed error message:
=================================
The following DataObject either cannot be created or cannot be initialized:
gUserFullName3
The query cannot be run for the following DataObject: gUserFullName3
InfoPath cannot run the specified query.
The SOAP response indicates that an error occurred on the server:

Server was unable to process request. --> The (SAMAccountName=) search
filter is invalid.
=================================

I get this error when previewing. the onload code looks like:

string strUserName = System.Environment.UserName;

//Get a reference to the Web Service
IXMLDOMDocument3 wsDOM =
(IXMLDOMDocument3)thisXDocument.DataObjects["gUserFullName3"].DOM;

//Set the SelectionNamespaces so that you can find the correct field
wsDOM.setProperty("SelectionNamespaces","xmlns:dfs=\"http://localhost/getUserInfo_June10_Ver1/\"
" + "xmlns:s0=\"http://localhost/getUserInfo_June10_Ver1/\"");

//Set Web Service parameter
wsDOM.selectSingleNode("/dfs:myFields/dfs:queryFields/tns:getCurrentUsrFullName/s0:localUsername").text = strUserName;

//Requery the webservice datasource
thisXDocument.DataObjects["gUserFullName3"].Query();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top