Hi. I do a caml query on the forms libraries in entire site collection with SPWeb.GetSiteData(SPQuery). For the field "ServerUrl" it returns just "/" instead of "/site name/library name/formName.xml". With item["ServerUrl"] is returns the right value, but i need to use the GetSiteData method.
Here is my code:
SPSiteDataQuery q = new SPSiteDataQuery();
q.Lists = "<Lists ServerTemplate='115' />";
q.Query = "<Where><And><And>"
+ "<Eq><FieldRef Name='" + UserId + "' /><Value Type='Text'>" + User + "</Value></Eq>"
+ "<Geq><FieldRef Name='Created' /><Value Type='DateTime'>" + dateFrom + "</Value></Geq></And>"
+ "<Leq><FieldRef Name='Created' /><Value Type='DateTime'>" + dateTo + "</Value></Leq></And></Where>";
q.Webs = "<Webs Scope='SiteCollection' />";
q.ViewFields =
"<FieldRef Name='Title' />" +
"<FieldRef Name='ID' />" +
"<FieldRef Name='Created' />" +
"<FieldRef ID='" + officeId + "' />" +
"<FieldRef ID='" + formStatusId + "' />" +
"<FieldRef ID='" + accessTypeId + "' />" +
"<FieldRef Name='ServerUrl' />" +
"<FieldRef Name='FileRef' />";
ret = web.GetSiteData(q);