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...
Showing posts with label CSOM. Show all posts
Showing posts with label CSOM. Show all posts
Thursday, October 20, 2016
"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...
"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...
“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...
“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:
· ...
“Client” in the namespace. For example, in the server object model you have:
· Microsoft.SharePoint.SPSite
· Microsoft.SharePoint.SPWeb
· Microsoft.SharePoint.SPList
In...
Wednesday, May 25, 2016
25
May
var context = new SP.ClientContext.get_current();
var web = context.get_web();
web.set_masterUrl('/sites/intranet2/_catalogs/masterpage/oslo.master');
web.set_siteLogoUrl('/sites/intranet2/Style%20Library/images/Contoso-Blue.png');
web.set_alternateCssUrl('/sites/intranet2/Style%20Library/CSS/Contoso.Intranet3.css');
web.update();
context.executeQueryAsync(onQuerySucceeded,...
Friday, May 20, 2016
string str="Peakfinder";
string strlist="Employee";
Web web = context.Site.OpenWebById(str);
List list = web.Lists.GetByTitle(strlist);
string queryTxt = "<View><Query><Where><Contains><FieldRef Name=\"Title\" /><Value Type=\"Text\">Auto</Value></Contains></Where></Query></View>";
CamlQuery...
Friday, February 12, 2016
12
Feb
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...
Friday, February 5, 2016
05
Feb
ExecuteOrDelayUntilScriptLoaded(init,"sp.js");
var currentUser;
function init(){
this.clientContext = new SP.ClientContext.get_current();
this.oWeb = clientContext.get_web();
currentUser = this.oWeb.get_currentUser();
this.clientContext.load(currentUser);
this.clientContext.executeQueryAsync(Function.createDelegate(this,this.onQuerySucceeded),...
Labels:
CSOM,
ECMAScript,
Javascript SharePoint