Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

basic Script Task (without using Web Service Task or an HTTP Connection ) where I can include the credential certification and allow me to inyect the code CSOM.Net

$
0
0

Hi all

Is there any available basic Script Task (without using Web Service Task or an HTTP Connection ) where I can include the credential certification and  allow me to inject this code in  CSOM.Net  (sharepoint client library) that download the last modified file from sharepoint 2010?

I have installed sharepoint clien library (sharepoint 2010), ssis 2008r, VStudio 2010.

The CSOM.Net code  that allow to indetify  the last modified file from sharepoint 2010 :
>>code start <<

ClientContext clientContext = new ClientContext("your site"); 
Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("Document Library"); 
clientContext.Load(spList); 
clientContext.ExecuteQuery(); 

if (spList != null && spList.ItemCount > 0) 
{
   Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery(); 
   camlQuery.ViewXml = 
      @"<View>  <Query> <OrderBy><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy> </Query> <ViewFields><FieldRef Name='FileLeafRef' /><FieldRef Name='Modified' /></ViewFields> <RowLimit>1</RowLimit> </View>";  

   ListItemCollection listItems = spList.GetItems(camlQuery); 
   clientContext.Load(listItems); 
   clientContext.ExecuteQuery(); 
}

>>code end <<


CRISTINA& MICROSOFT Forum




Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>