Showing posts with label Client object model. Show all posts
Showing posts with label Client object model. Show all posts

Thursday, December 24, 2020

24 Dec

Unauthorized exception while downloading file from SharePoint

In this article, How to download the SharePoint  library files in Document Library var file = clientContext.Web.GetFileByServerRelativeUrl(fileRef);                clientContext.Load(file);                clientContext.ExecuteQuery(); ...

Thursday, October 20, 2016

20 Oct

Client Object Model vs Server Object Model?

Server Object Model? SharePoint server where the Server Object Model binaries Example inside Web Parts / Workflows. Client Object Model? client machines where the entire SharePoint binaries are not available. Example Windows Forms application in a client machin...
20 Oct

Update list item or change item value using Client Object Model

"Client" in the namespace.  For example, in the server object model you have: Microsoft.SharePoint.SPSite Microsoft.SharePoint.SPWeb Microsoft.SharePoint.SPList In the client object model you have: Microsoft.SharePoint.Client.Site Microsoft.SharePoint.Client.Web Microsoft.SharePoint.Client.List NameSpace: Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Example...
20 Oct

Add new item or Insert new item using CLient Object Model

"Client" in the namespace.  For example, in the server object model you have: Microsoft.SharePoint.SPSite Microsoft.SharePoint.SPWeb Microsoft.SharePoint.SPList In the client object model you have: Microsoft.SharePoint.Client.Site Microsoft.SharePoint.Client.Web Microsoft.SharePoint.Client.List NameSpace: Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Example...
20 Oct

Get By Search using Client Object Model

"Client" in the namespace.  For example, in the server object model you have: Microsoft.SharePoint.SPSite Microsoft.SharePoint.SPWeb Microsoft.SharePoint.SPList In the client object model you have: Microsoft.SharePoint.Client.Site Microsoft.SharePoint.Client.Web Microsoft.SharePoint.Client.List NameSpace: Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Example...
20 Oct

Get By Row Limit using Client Object Model

“Client” in the namespace.  For example, in the server object model you have: Microsoft.SharePoint.SPSite Microsoft.SharePoint.SPWeb Microsoft.SharePoint.SPList In the client object model you have: Microsoft.SharePoint.Client.Site Microsoft.SharePoint.Client.Web Microsoft.SharePoint.Client.List NameSpace: Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Example...
20 Oct

Update List Items Client Object Model

“Client” in the namespace.  For example, in the server object model you have: ·         Microsoft.SharePoint.SPSite ·         Microsoft.SharePoint.SPWeb ·         Microsoft.SharePoint.SPList In the client object model you have: ·        ...
20 Oct

Get List Items Client Object Model

“Client” in the namespace.  For example, in the server object model you have: ·         Microsoft.SharePoint.SPSite ·         Microsoft.SharePoint.SPWeb ·         Microsoft.SharePoint.SPList In...

Friday, February 12, 2016

12 Feb

When we get retrive People or Group field returning semicolon hash then Name

1;#Deepak Kumar Get User name: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupValue; Get User ID: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupId; Using Split fuction: properties.ListItem["Staff Member"].ToString(); You are going to be returned their...

Tuesday, January 5, 2016

05 Jan

How to access the sharepoint 2013 list from another web application using CSOM

we have to add this reference Microsoft.SharePoint.Client Microsoft.SharePoint.Client.Runtime ClientContext context = new ClientContext("http://peakfinders"); Web web = context.Web; List list = web.Lists.GetByTitle(“Users”); CamlQuery caml=new CamlQuery(); ListItemCollection items = list.GetItems(caml); context.Load<List>(list context.Load<ListItemCollection>(items context.ExecuteQuery(); foreach...

Sunday, December 27, 2015

27 Dec

ConditionalScope using SharePoint Client Object Model

ClientContext context = new ClientContext("http://SiteUrl"); SP.List list = context.Web.GetCatalog(ListTemplateType.WebPartCatalog); BasePermissions perm = new BasePermissions(); perm.Set(PermissionKind.ManageLists); ConditionalScope scope =     new ConditionalScope(context,                          ()...
27 Dec

Do and Don't do When we using SharePoint Client Object Model

Please follow below steps in SharePoint Client object Model Development: ClientContext.ExecuteQuery before accessing any value properties Don't use value objects returned from methods or properties in the same query. When we methods or properties that return client objects in another method call in the same query Group...
27 Dec

How to programmatically get permissions for list using client object model SharePoint 2013

//Get the lists ClientContext clientContext = new ClientContext(_siteurl);clientContext.AuthenticationMode =ClientAuthenticationMode.Default;clientContext.Credentials = new System.Net.NetworkCredential(“peakfinders”, “password@1”, “peakfinders”);Web oweb = clientContext.Web;           ...

Tuesday, December 15, 2015

15 Dec

How to get all Sub Webs or SubSite using Client Object Model in SharePoint 2013

static string mainpath = "http://peakfinders/";        static void Main(string[] args)        {            subsite(mainpath);                 }        public static  void  subsite(string...

Wednesday, October 14, 2015

14 Oct

How to retrieve User profile Service Properties using Client Object Model In windows Application or Console application

Solution Explorer, right-click on the "References" folder and then click on "Add Reference" We have to add ddl: Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Microsoft.SharePoint.Client.UserProfiles.dll Namespace: using Microsoft.SharePoint.Client; using Microsoft.SharePoint.Client.UserProfiles; Coding: string...

Tuesday, October 6, 2015

06 Oct

How to get field values ECMA Script/Javascript using CSOM?

In this below script,get field values ECMA Script/Javascript using CSOM SharePoint client object model used to retrieve, update, and manage data in SharePoint 2013. Types: 1.Server Object Model 2.Client Object Model 3.Javascript Library 4.Rest Service/OData Library Loads the SP.Runtime.js and SP.js files by using...

Tuesday, March 17, 2015

17 Mar

how to create CRUD operation in SharePoint App in Client Object Model?

SharePoint app Client object model using ECMAScript Add List item how to create a custom properties in user profile service application Open to Central Adminstration->Application Management->Manage Service Applications-> Click on the User Profile Service...