Skip to main content

Posts

Showing posts with the label SharePoint

Adding Items to List in By using Admin account or Any other domain account

Dear All,  Some time you want to add the item in the list which user doesn't have a permission, the below code will impersonate the user in sharepoint to add the code in the list by using domain account  using System; using System.Collections.Generic; using System.Linq; using System.Text; //SharePoint namespace using Microsoft.SharePoint.Client; namespace AddItemsToList { class Program { static void Main(string[] args) { string siteUrl = "http://sharepointserver.com"; ClientContext clientContext = new ClientContext(siteUrl); clientContext.Credentials = newSystem.Net.NetworkCredential(@"domain/userName", "password","domain.com"); Web site = clientContext.Web; //Getting List List list = site.Lists.GetByTitle("Students"); //Adding Items to List ListItemCreationInformation listItemCreationInformation = newListItemCreationInformation(); ListItem listItem = list.AddItem(listItemCreationInformation); li...

How to delete corrupted sharepoint list with powershell

Dear All If you want to delete any corrupted SharePoint list through PS script here it is     $web = get-spweb -Identity http://sp2010     $list = $web.lists["corrupted list name"]     $list.AllowDeletion = $true     $list.Update()     $list.Delete() Original post reference https://sharepointgroup.wordpress.com/2012/07/05/how-to-delete-corrupted-sharepoint-list-with-powershell/  I hope it save the time  Regards 

How to Create a Workflow to Change Item Level Permissions

Dear All please have look i did not test it but it seem workable Original Post: http://spcycle.blogspot.com/2012/01/how-to-create-workflow-to-change-item.html  Yesterday in our ShareLabs session a question was asked on how to display and/or secure data in a list based on criteria other than the author. I am going to use colors as the criteria for the purposes of this post. So the scenario is that we want to build a list to track something like, say.... oh I don’t know…. how about bicycles. We only want to display certain colors to certain groups for whatever reason. There are multiple ways to accomplish this, one of them being that we create views that filter the colors that we want to display, then create a page and drop a web part for each filtered view, and then apply Audience Targeting on each web part. At first blush this looks like it would accomplish what we want it to but what happens when a user goes to the list itself instead of our web part page? They are goi...

Get Document Version In InfoPath Form

Dear All,  If you are looking for insert the auto version number in Infopath 2010 sharepoint form then you need to use the following code under calculated field substring-before( substring-after( /processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"') That's it Regards Rashid Imran Bilgrami CEO Best visualization http://www.bestvisualization.com