Tag Info

New answers tagged

1

Using listItem.BreakRoleInheritance(false, false); to break inheritance for Folder1 is correct, if you want to have unique permissions set from this level on. But if you want Folder2 to inherit from Folder1 and Folder3 from Folder2 (which basically means both inherit from Folder1) you CANNOT use BreakRoleInheritance. This will break inheritance of ...


0

I had a list where I needed to edit multiple items and used the following process to get it done; Select the list view from the toolbar ribbon and then select Datasheet view from the submenu items. This will convert your view to an excel like spread sheet. Sort the columns and then sort by the column you want to edit to have the target cells listed ...


0

private SPListItem CopyItem(SPListItem sourceItem, string destinationListName) { //Copy sourceItem to destinationList SPList destinationList = sourceItem.Web.Lists[destinationListName]; SPListItem targetItem = destinationList.Items.Add(); foreach (SPField f in sourceItem.Fields) { //Copy all except attachments. if ...


0

Amal helped and I used his code as a start, but this is the full answer. I also switched to getting the folder name instead of ID, that I pass in as fldrName: using (SPSite site = new SPSite(SPContext.Current.Web.Url)) { using (SPWeb web = site.OpenWeb("/Docs/") { SPDocumentLibrary docList = (SPDocumentLibrary)web.Lists["Documents"]; ...


1

if (fldrItem.RoleAssignments.Count > 0) { SPRoleAssignmentCollection assignColl = fldrItem.RoleAssignments; foreach (SPRoleAssignment assignment in assignColl) { if(assignment.Member.Name == group.Name) { //Now you can look into the associated RoleDefinitions from assignment } } }


0

I've solved error changing date format... This: var date = moment(data[i]['Date']+' '+data[i]['Time'], 'M/D/YYYY hh:mma'); data[i]['Date'] = date.format('DD/MM/YYYY HH:mm'); To this: var date = moment(data[i]['Date']+' '+data[i]['Time'], 'M/D/YYYY hh:mma'); data[i]['Date'] = date.format('YYYY-MM-DDTHH:mmZ');



Top 50 recent answers are included