Posts

Showing posts from September, 2013

SharePoint Client Object Model Upload Metadata and Check In File

When you enable versioning on a document library and want to use client object model upload method (in my case SaveBinaryDirect), you will find that your new uploaded file is not available in the view straightaway. It resides in List Settings --> Manage files which have no checked in version (under Permissions and Management section) and you have to take ownership manually. If you want to check in the file automatically (along with filling out metadata) you would need to do extra steps: NOTE: I found that with .docx extension, even though the SaveBinaryDirect increments the minor version (debugging), when calling OverwriteCheckIn it does not increment the file minor version. Not sure if this is a bug :) You must also fill out all required fields before being able to check the file in. HTH, Andreas

Sharepoint Client Object Model (CSOM) Get Choice Field Values

HTH, Andreas

Sharepoint Client Object Model (CSOM) Get Files from Document Library Folder

Hi all, Just want to share a function that shows how to get the files from a specific folder using CSOM: HTH, Andreas

Sharepoint 2013 CRM2011 Document Upload and Document Location Helper (CSOM and OM)

Hi all, Playing around with SharePoint CRM 2011 integration, I managed to construct a helper function that would be useful for future projects. This is when you want to upload document to SharePoint as well as creating document location in CRM 2011. There are several ways of uploading documents to SharePoint. 1. Object Model 2. Client Object Model 3. Rest API In this post, I will show you the first two. If your code is sitting in SP server, you can use the traditional object model. Here you go: You might want to impersonate credentials when uploading to a different SP site. With Firefox, when I try to upload to secured SP site (https) I got prompted login box which is annoying (as opposed to single sign on with IE/Chrome). So as a workaround we can use the Client Object Model way to upload to SharePoint in order to specify the credentials: Here I also ensure that the folder exists before we upload document (otherwise create them!). Lastly, the CRM 2011 documen...