Posts

Showing posts from 2015
Restrict users to  access only workflow task created form them in sharepoint solution : http://community.spiceworks.com/how_to/66248-restrict-a-sharepoint-task-to-its-assigned-user-group
Image
Could not find a web server at www.domain.com. Please check to make sure that the web server name is valid and your proxy settings are set correctly. Solution: make sure your use a proxy server is unchecked . make sure you are able to get to other pages on browser .check for internet connectivity .
Select view fro sharepoint infopath form . solution: add  "&DefaultView=YourviewName"  to your url . ex: https://yoursharepointsite.com?conetnttype:XXXXXX&ID=XX& DefaultView=YourviewName this will make sure when you click on url you selected view is displayed instead of default .
Restore a .cmp file sharepoint . Restore content database for share point. restore sharepoint lists and libraries. http://absolute-sharepoint.com/2013/08/how-to-move-a-list-from-sharepoint-2010-to-sharepoint-2013.html
create simple grid view with asp.net and SQL server. solution : http://www.aspsnippets.com/Articles/Export-GridView-Data-to-Excel-using-OpenXml-in-ASPNet.aspx
Image
ADD KEY Process Indicators (KPI) to SharePoint list : steps to make indicator coloum : add a new calculated column to you list : add the three indicators icons to site asserts document library and use them from there. add the formula as below : =IF([complete %]<10,"<img src='http://yoursiteurl/sites/name/SiteAssets/indicator_button.png' alt='red' height='22' width='22'>", IF(AND([complete %]>9,[complete %]<50),"<img src='http://yoursiteurl/sites/name/SiteAssets/yellow.jpg' alt='yellow' height='22' width='22'>", IF([complete %]>50,"<img src='http://yoursiteurl/sites/name/SiteAssets/green.jpg' alt='green' height='22' width='22'>",))) ADD more if conditions basing on you requirement. my assumption for conditions red<10 10>yellow<50 green>50
shraepoint 2013 wcf service  : endpoint not found service.svc file <%@ ServiceHost Language="C#" Service=" VS2012WcfService.ISAPI.MyService.MyService, $SharePoint.Project.AssemblyFullName$"     CodeBehind="MyService.svc.cs"     Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> SOAP = MultipleBaseAddressBasicHttpBindingServiceHostFactory REST = MultipleBaseAddressWebServiceHostFactory Data Service = MultipleBaseAddressDataServiceHostFactory https://msdn.microsoft.com/en-us/library/office/ff521581(v=office.14).aspx
Export to excel Using OPENXML  C# ,asp.net, mvc : public void exporttoexcelfromDataset(DataSet dataSet){ try{                                           // Create a spreadsheet document by supplying the filepath.                         // By default, AutoSave = true, Editable = true, and Type = xlsx.                         MemoryStream ms = new MemoryStream();                         HttpContext.Current.Response.ClearHeaders();                         HttpContext.Current.Response.ClearContent();                         HttpContext.Current.Response.Clear();  ...
Create a claims base sharepoint sitecollection NOTE: We are assuming application pool already exists $ap = New -SPAuthenticationProvider -UseWindowsIntegratedAuthentication -DisableKerberos   New -SPWebApplication -Name "Contoso Portal"      -ApplicationPool "Default SharePoint Web Apps"      -HostHeader portal.contoso.com -Port 80 -Url http://portal.contoso.com      -AuthenticationMethod NTLM -AuthenticationProvider $ap      -DatabaseName "WSS_Content_Portal"
Correlation id :uls logs search Merge -SPLogFile -Path ".\error.log" -Correlation "your corellation id shoed on sp site "
Add event Reciver to sharepoint 2013 List : vs2013 ==> new project ==> sharepoint 2013 empty project ==> select farm level deployment ==> right click project file and add new item ==>select event listener ==>select list type as custom list or any approiate one you are working with and say ok now you will see bunch of files  and among these emelant.xml is where you configure to which list this eventhandler have to be pointing to so . look at top part of element.xml and you should see   <Receivers listtemplateid="100"> replace this with   <Receivers ListUrl="Lists/Yourlistname"> thats it now run your applicationa and when you run it you can go and look at manage site features and you should see this feature in the list as activated . so ad a new item and add break point to check if the evnt is captured or not .
sharepoint wcf service : http://www.robertseso.com/2013/05/adding-custom-wcf-services-to.html tocreate a service . http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/ watch on viemo: https://vimeo.com/72284775
Powershell to get number of followers for a pericular user : Add-PsSnapin microsoft* $site = Get-SPSite http://yoursiteurl/ $servContext = Get-SPServiceContext ( $site ) $profileMgr = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager ( $servContext ) $userpro = $profileMgr . GetUserProfile( "Domain\username" ) $followMgr = New-Object Microsoft.Office.Server.Social.SPSocialFollowingManager ( $userpro , $servContext ) $followers = $followMgr . GetFollowers() $followerd = $followMgr . GetFollowed( "Users" ) $followerdSites = $followMgr . GetFollowed( "Sites" )  c# code : for any perticular user public List<int> GetFollowersAndFollowedByName(string name)         {                             List<int> fAndf = new List<int>();                 ...
Upload from excel sheet to sharepoint List : Method 1  Excel Interop dlls: using Microsoft.Office.Interop.Excel;                 #region excel interop                 import to sharepoint from excel with excel interop dll.                 try                 {                     MyApp = new Excel.Application();                     MyApp.Visible = false;                     MyBook = MyApp.Workbooks.Open(path);                     MySheet = (Excel.Worksheet)MyBook.Sheets[1];                     var lastRow = MySheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLa...