I have an InfoPath Form. I have this code (c#):
public void IdNumber_OnAfterChange(DataDOMEvent e)
{
if (e.IsUndoRedo)
{ return;
}
if (e.Operation=="Delete")
{ return;
}
XmlDocument xmlDoc = new System.Xml.XmlDocument();
XmlNode ndQuery = xmlDoc.CreateNode
(XmlNodeType.Element,"Query","");
XmlNode ndViewFields = xmlDoc.CreateNode (XmlNodeType.Element,"ViewFields","");
XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,"QueryOptions","");
string str=e.NewValue.ToString();
ndQueryOptions.InnerXml
= "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" +
"<DateInUtc>TRUE</DateInUtc>";
ndQuery.InnerXml="<Where><Eq><FieldRef Name='IdNumber'/><Value Type='Text'>"+str+"</Value></Eq></Where>";
try
{
XmlNode returnXml = WS.GetListItems("FormsFolder",null,ndQuery,null,null,ndQueryOptions);
}
}
This is the code. I get error that the field with this name not found!!
That's mean that the field name "IdNumber" not fount in the SharePoint list.
Why it not found it? I know that I nedd to replace the field name with somthing else. How to do it?