반응형
SharePoint Date UTC 말고 출력시
http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/
The different Query Options need to be handled a bit differently than with the SharePoint Server Object Model.
The row limit can also be specified within the ViewXml property:
query.ViewXml = "<View>" + "<Query>" + "<Where><Eq><FieldRef Name='Country' /><Value Type='Text'>Belgium</Value></Eq></Where>" + "<OrderBy><FieldRef Name='City'/></OrderBy>" + "</Query>" + "<RowLimit>5</RowLimit>" + "</View>";
Dates in UTC
You can choose to return dates in UTC (Coordinated Universal Time) by setting the DatesInUtc property of the CamlQuery instance:
query.DatesInUtc = true;
query.DatesInUtc = false; //꺼준다.
Include attachment URLs
Using CAML you are able to know if list items have attachment by adding a w> element to the ViewFields element in the ViewXml property:
query.ViewXml = "<View>" + "<ViewFields>" + " <FieldRef Name='Title' /><FieldRef Name='City' /><FieldRef Name='Attachments' />" + "</ViewFields>" + "</View>";
SharePoint will return a boolean indicating whether the list item has attachments or not.
http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/