New answers tagged

0

I suppose a query can be built filtering taskItem["WorkflowListId"] taskItem["WorkflowItemId"] as discussed in this social technet article


0

I think you can achieve your scenario via Server-side Object Model C# to can update a column value in the Version history. Code: SPSite site = new SPSite("http://sharepointsite/subsite"); SPWeb web = site.OpenWeb(); SPList list = web.Lists["My List"]; web.AllowUnsafeUpdates = true; foreach (SPListItem item in list.Items) { item["Modified"] = "Set the ...


0

Try updating the file in addition to the SPListItem: targetDoc.Update() targetDoc.File.Update()


0

You can achieve this by using Ite mAdded event receiver. Whenever an item will be added your custom code within above event receiver will be excuted. Steps:- 1.Retreive all list item using query which was created today. 2. If itemCount is 0 ,then there is no item created today ,so assign value to that field for new item using below format Value=DateTime....


0

I usually use a helper list when I'm having this requirement. The helper list has the following columns: Title | Modified |Index ----------------------------------- SomeUniqueTitle | 01.01.2016 | 1 When an item is created, a workflow will be started. The workflow checks the Modified date of that specific item in the helper list. If ...


1

May be users can only edit their own items. There is a setting somewhere ( see for example here: http://stackoverflow.com/questions/26510951/sharepoint-2013-list-users-only-view-their-own-items )


0

The closest thing I can think of is this pseudocode: foreach roleAssignment 'rA' foreach roleDefinitionBinding 'rDb' in rA.get_roleDefinitionBindings() Check if user has the base permissions associated with the contributor role by repeatedly using rDb.has(...) which checks for a base permission if true, delete current roleAssignment from listItem An ...


3

Using SPList.Items property is bad practice. Each time the property is accessed, it requests all items with all fields from database. Instead you should always use SPList.GetItems(). SPList.GetItems(params string[]) - you can use it to load only the fields that you need. As far as I remember it'll only return items in the root folder of the list. SPList....


1

If it is just a case to get all items than I always use DataTable to get allitems using below code & do the operations. static void Main(string[] args) { try { SPWeb oWebsite = SPContext.Current.Web; SPList oList = oWebsite.Lists["Employees"]; SPListItemCollection collListItems = oList.GetItems(); DataTable dt = ...



Top 50 recent answers are included