Thursday, November 12, 2015

Column 'AuthorId' does not exist. It may have been deleted by another user : Rest API

Rest APIs are resource full while working with Sharepoint 2013 and Jquery . I had a simple scenario where I wanted to show only list items created by logged in users .

During the filter by AuthorId I came across this issue 
Column 'AuthorId' does not exist. It may have been deleted by another user


Resolution 

When all columns in 

 url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Your List name')/items?&$filter=Author eq "+ userid +"&$orderby=Created desc",

When selected columns

 url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getByTitle('Your List name')/items?&$filter=Author eq "+ userid +"&$select=Col1 , col2,AuthorId, &expand=Author&$orderby=Created desc",

Wednesday, July 29, 2015

The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.


Have receive this error couple of times while working with share point web services ,


"The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators."

Outsource the incorrect URL caused this , however the description of the error makes it confusing 

Correct URL should be http://web.domain.com/sites/sitename/_vti_bin/lists.asmx

URL by error occurred http://collaborate.kronos.com/sites/datadump/vti_bin/lists.asmx - notice missing "_ "  here

Thursday, July 16, 2015

Send Notification Prior to Due date

Send Notification Prior to Due date 

Was working on task of sending notification based on due dates of SharePoint library or list, found this wonderful post form Laura Rogers on http://www.wonderlaura.com/   .
 This post explains how we can setup early notification based on due date. This can  achieved by  SharePoint OutofBox features like Sharepoint desiner workflow , Content type, and Information management Policy

Reference :  http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=64

Friday, June 26, 2015

Info path with people picker..

http://www.sharepointassist.com/2009/02/27/adding-a-contact-selectorpeople-picker-to-an-infopath-form/

Wednesday, June 24, 2015

Write to CSV file using power shell

Being share point administrator it was always one part of job to generate reports for multiple site , With help of object model reference it's easy to pull data using powershell and dumping this into CVS is always good idea for further reporting


This piece of code can be use to generate power shell output in CSV format however not limited to share point . It;s very generic example to show how data can be populated in CSV


Powers hell code :


#Write to CSV File
$fileName = "FilePath\Sample1.csv"
#write header of file 
"Site Collection `t Site `t List" > $fileName
for ($i -eq 0; $i -le 50; $i++)
{
    "SiteCollection"+$i +"`t"+ "Site"+$i +"`t"+"List"+$i >>$filename
}
write-host "Report complated please refer file :" $filename

Wednesday, May 13, 2015

How to get windows server last reboot time

Windows servers last reboot time can be retrieve using powershell command get-eventlog System | where-object {$_.EventID -eq "6005"} | sort -desc TimeGenerated

Wednesday, May 6, 2015

Sharepoint 2016 Preview


https://sp2016demo.fpweb.net/sites/Documents/_layouts/15/start.aspx#/


SharePoint 2016 Preview Site has been launched

http://sp2016demo.fpweb.net/SitePages/Home.aspx

How to test web service for sharepoint


Many time there is requirement for consuming Sharepoint webservices from other non share point or share point environments . Having tool to quickly use the webservice check various method could be very handy in these type of scenarios . This alloys to consume and test webservice without writing any code and can be very useful for rapid development or administrators

Most of the time I end up with using SoapUI opensource tool from http://www.soapui.org/

Soap UI provide opensource and Pro license version based on your needs.




Monday, March 23, 2015

Read file in Powershell line by line

Reading  file in Powershell line by line can be helpful if you want do some operation on file

Example

Perform same operation for each line of file

1. Searching for specific words in line
2. navigating to different urls to check response
3. etc

I wrote this piece of code to update SharePoint Site logo for multiple site


$file= Get-Content("FileName")
foreach ($line in $file)
{
    Write-Host "One line from file"
    Write-Host $line
}

Monday, March 16, 2015

Update Sharepoint site logo image using powershell

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")
# Provide Site URL
$Url="https://mySharepointSite.Company.com/sites/demo/default.aspx"
$site = new-object Microsoft.SharePoint.SPSite($Url)
$web=$site.OpenWeb();
$web.SiteLogoUrl = "/demo/shared documents/logo.gif"
$web.Update()
$web.Close()
$site.Dispose()

Thursday, January 8, 2015

Execute Powershell script from Batchfile

Executing powershell script can be handy specially you want to schedule it using windows scheduler

It's Simple :


  • Create .bat file
  • Edit file with notepad
  • Add line
    •    powershell  filepath\yourscriptname.ps1
  • Save and Close file
  • Your powershell script is ready to run next time , when execute bat



Add new Item to share point list using powershell


Here is a simple example to add new item to sharepoint list. Every time powershell script is executed it will add new item to the list  with pre populated Title as data and time.

SharePoint Environment 2007

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$siteurl="https://site url"
$listname="List name"
$site=new-object Microsoft.SharePoint.SPSite($siteurl);
$web=$site.openWeb();
$list = $web.Lists[$listname] ;
$item = $list.Items.Add();
$item["Title"] = get-date;
$item.Update();
$web.Dispose();
$site.Dispose();
write-host "Item added to list $listname"

Monday, January 5, 2015

Moss 2007 Web services

http://msdn.microsoft.com/en-us/library/office/bb862916(v=office.12).aspx

Friendly NameLocationDescription
Alerts
/_vti_bin/alerts.asmx
Provides methods for working with alerts for list items in a SharePoint site.
Area Web service
/_vti_bin/areaservice.asmx
Deprecated Web service. Provides an area interface for remote clients.
Authentication Web service
/_vti_bin/Authentication.asmx
Provides ability for Web services to operate in conjunction with forms authentication.
BDC Fields Resolver Web service
/_vti_bin/bdcfieldsresolver.asmx
BDC Fields Resolver Web service for client applications. Reserved for internal use only.
BDC Web service
/_vti_bin/businessdatacatalog.asmx
Business Data Catalog metadata Web service. Reserved for internal use only.
CMS Content Area Toolbox Info Web service
/_vti_bin/contentAreaToolboxService.asmx
Designed for use by the Microsoft Office SharePoint Designer client to use.
Copy Web service
/_vti_bin/Copy.asmx
Provides methods for copying items between locations in the SharePoint environment.
List Data Retrieval Web service
/_vti_bin/DspSts.asmx
Provides a method for performing queries against lists in Windows SharePoint Services.
Document Workspace Web service
/_vti_bin/DWS.asmx
Provides methods for managing Document Workspace sites and the data they contain.
Excel Services Web service
/_vti_bin/ExcelService.asmx
Provides methods to call Excel Services remotely or to work as a callback for Web Parts.
Forms Web service
/_vti_bin/Forms.asmx
Provides methods for returning forms used in the user interface when working with the contents of a list.
Forms Services proxy Web service
/_vti_bin/FormsServiceProxy.asmx
Provides methods for Forms Services to proxy requests to remote data sources from Web-based forms.
Forms Services Web service
/_vti_bin/FormsServices.asmx
Provides methods to call Forms Services remotely or to work as a callback for Web-based forms.
Imaging Web service
/_vti_bin/Imaging.asmx
Provides methods that enable you to create and manage picture libraries.
Lists Web service
/_vti_bin/Lists.asmx
Provides methods for working with lists and list data.
Meetings Web service
/_vti_bin/Meetings.asmx
Provides methods that enable you to create and manage Meeting Workspace sites.
Official File Web service
/_vti_bin/officialfile.asmx
Provides methods for sending files to a records repository.
People Web service
/_vti_bin/People.asmx
Provides methods for working with security groups.
Permissions Web service
/_vti_bin/Permissions.asmx
Provides methods for working with the permissions for a site or list.
Published Links Web service
/_vti_bin/publishedlinksservice.asmx
Office system client applications and other applications can obtain the list of published links on the server that are targeted to the current user.
Publishing Service Web service
/_vti_bin/PublishingService.asmx
Provides methods to remotely work with the publishing service.
Search Web service
/_vti_bin/search.asmx
Allows access to Enterprise Search results from client applications and Web applications outside of the context of a SharePoint site.
SharePoint Directory Management Web service
/_vti_bin/sharepointemailws.asmx
Provides methods for remotely managing distribution groups.
Sites Web service
/_vti_bin/sites.asmx
Provides methods for returning information about the site templates for a site collection.
Slide Library Web service
/_vti_bin/SlideLibrary.asmx
Provides methods for slide library callbacks or remote publishing of slides.
Search Crawl Web service
/_vti_bin/spscrawl.asmx
Provides methods for remote Office SharePoint Server 2007 server farms to crawl a local farm.
Search Web service
/_vti_bin/spsearch.asmx
Provides methods for remotely performing searches within a Windows SharePoint Services deployment.
Users and Groups Web service
/_vti_bin/UserGroup.asmx
Provides methods for working with users, site groups, and cross-site groups.
User Profile Change Web service
/_vti_bin/userprofilechangeservice.asmx
Provides methods to query the user profiles change log remotely.
User Profile Web service
/_vti_bin/userprofileservice.asmx
Provides a user profile interface for remote clients.
Versions Web service
/_vti_bin/versions.asmx
Provides methods for working with file versions.
Views Web service
/_vti_bin/Views.asmx
Provides methods for working with views of lists.
Web Part Pages Web service
/_vti_bin/webpartpages.asmx
Provides the methods to send information to and retrieve information from Web services.
Webs Web service
/_vti_bin/Webs.asmx
Provides methods for working with sites and subsites.
Workflow Web service
/_vti_bin/workflow.asmx
Provides methods to work with workflows.