Wednesday, January 17, 2018
Wednesday, July 19, 2017
SharePoint Curd Operation Using CSOM
Adding SharePoint 2013 SPList Item Using CSOM
string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation(); ListItem oListItem = oList.AddItem(itemCreateInfo); oListItem["Title"] = "My New Item!"; oListItem["Body"] = "Hello World!"; oListItem.Update(); clientContext.ExecuteQuery();
Update SharePoint 2013 SPList Item Using CSOM
string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItem oListItem = oList.Items.GetById(3); oListItem["Title"] = "My Updated Title."; oListItem.Update(); clientContext.ExecuteQuery();
Delete SharePoint 2013 SPList Item Using CSOM
string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItem oListItem = oList.GetItemById(2); oListItem.DeleteObject(); clientContext.ExecuteQuery();
Monday, July 17, 2017
Create new Content Query Item Template
https://www.credera.com/blog/technology-insights/microsoft-solutions/displaying-custom-fields-sharepoint-2013-content-query-web-part/
Wednesday, July 12, 2017
Rest API Curd Operations
Rest API Curd Operations
Reference urls
https://www.codeproject.com/Articles/990131/CRUD-operation-to-list-using-SharePoint-Rest-API
https://social.technet.microsoft.com/wiki/contents/articles/33795.sharepoint-2013-crud-operation-on-list-items-using-rest-api-services.aspx
Retrive LIst Items
$.ajax
({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Testing')/items?$select=Title",
type: "GET",
// data: data,
headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"IF-MATCH": "*",
"X-HTTP-Method": null
},
cache: false,
success: function(data)
{
debugger;
alert("Hiiiii");
$("#ResultDiv").empty();
for (var i = 0; i < data.d.results.length; i++)
{
var item = data.d.results[i];
$("#ResultDiv").append(item.Title);
}
},
error: function(data)
{
alert("Hi");
$("#ResultDiv").empty().text(data.responseJSON.error);
}
});
}
Create List Item
function AddListItem()
02.{
03. var industryVal = $("#Industry").val();
04. var Company = $("#Company").val();
05. $.ajax
06. ({
07. url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('companyInfo')/items",
08. type: "POST",
09. data: JSON.stringify
10. ({
11. __metadata:
12. {
13. type: "SP.Data.TestListItem"
14. },
15. Company: Company,
16. Industry: industryVal
17. }),
18. headers:
19. {
20. "Accept": "application/json;odata=verbose",
21. "Content-Type": "application/json;odata=verbose",
22. "X-RequestDigest": $("#__REQUESTDIGEST").val(),
23. "X-HTTP-Method": "POST"
24. },
25. success: function(data, status, xhr)
26. {
27. retriveListItem();
28. },
29. error: function(xhr, status, error)
30. {
31. $("#ResultDiv").empty().text(data.responseJSON.error);
32. }
33. });
34.}
Update List Item
function updateListItem()
02.{
03. var industryVal = $("#Industry").val();
04. $.ajax
05. ({
06. url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('companyInfo')/items(7)", // list item ID
07. type: "POST",
08. data: JSON.stringify
09. ({
10. __metadata:
11. {
12. type: "SP.Data.TestListItem"
13. },
14. Industry: industryVal
15. }),
16. headers:
17. {
18. "Accept": "application/json;odata=verbose",
19. "Content-Type": "application/json;odata=verbose",
20. "X-RequestDigest": $("#__REQUESTDIGEST").val(),
21. "IF-MATCH": "*",
22. "X-HTTP-Method": "MERGE"
23. },
24. success: function(data, status, xhr)
25. {
26. retriveListItem();
27. },
28. error: function(xhr, status, error)
29. {
30. $("#ResultDiv").empty().text(data.responseJSON.error);
31. }
32. });
Delete List Item
function deleteListItem()
02.{
03. $.ajax
04. ({
05. url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('companyInfo')/items(7)",
06. type: "POST",
07. headers:
08. {
09. "X-RequestDigest": $("#__REQUESTDIGEST").val(),
10. "IF-MATCH": "*",
11. "X-HTTP-Method": "DELETE"
12. },
13. success: function(data, status, xhr)
14. {
15. retriveListItem();
16. },
17. error: function(xhr, status, error)
18. {
19. $("#ResultDiv").empty().text(data.responseJSON.error);
20. }
21. });
Monday, July 9, 2012
Create Custom Settings link
Add the following 2 attributes to your future element file and deploye
Id=”CustomFeatureGroup”
Title =”Custom Feature Links”
Sequence=”1000″ Location=”Microsoft.SharePoint.SiteSettings”
ImageUrl=”/_layouts/images/IMAGE_NAME.PNG”>
Id=”CustomFeatureLink”
GroupId=”CustomFeatureGroup”
Location=”Microsoft.SharePoint.SiteSettings”
Sequence=”1000″
Title=”Custom Feature Settings”>
Url=”/_layouts/CstmFeat/settings.aspx”/>
For adding element file in vs2010 use the following url
http://ranaictiu-technicalblog.blogspot.in/2010/09/sharepoint-2010-development-with-visual.html
Id=”CustomFeatureGroup”
Title =”Custom Feature Links”
Sequence=”1000″ Location=”Microsoft.SharePoint.SiteSettings”
ImageUrl=”/_layouts/images/IMAGE_NAME.PNG”>
Id=”CustomFeatureLink”
GroupId=”CustomFeatureGroup”
Location=”Microsoft.SharePoint.SiteSettings”
Sequence=”1000″
Title=”Custom Feature Settings”>
Url=”/_layouts/CstmFeat/settings.aspx”/>
For adding element file in vs2010 use the following url
http://ranaictiu-technicalblog.blogspot.in/2010/09/sharepoint-2010-development-with-visual.html
Tuesday, April 8, 2008
Freshers JOb sites
www.freherscafe.blogspot.com
http://www.craigslist.org/about/sites.html
http://jobkhojo.in
www.donetspider.com
Jobs
http://www.zdnetasia.com/techjobs/jobs/0,3800009332,44557748p,00.htm
www.w3schools.com
ASP.NET Interview question
http://blogs.crsw.com/mark/articles/254.aspx
http://ittechnicalforum.blogspot.com/search/label/VB%2FASP%2FNET
http://www.interviewqueries.com/
http://www.craigslist.org/about/sites.html
http://jobkhojo.in
www.donetspider.com
Jobs
http://www.zdnetasia.com/techjobs/jobs/0,3800009332,44557748p,00.htm
www.w3schools.com
ASP.NET Interview question
http://blogs.crsw.com/mark/articles/254.aspx
http://ittechnicalforum.blogspot.com/search/label/VB%2FASP%2FNET
http://www.interviewqueries.com/
Subscribe to:
Comments (Atom)