Tag Info

Hot answers tagged

6

You have to break permission inheritance on each document that you want to protect. Go to the document library, select the options menu (...) and the additional options (...) and select Advanced > Shared with. On that view select advanced and click on the ribbon button "Stop inheriting permissions". Add the group/users who should have access to the ...


5

You could utilize GetItems method and specify the following query: <View Scope="RecursiveAll"> <Query> <Where> <Eq> <FieldRef Name="FSObjType" /><Value Type="Integer">1</Value> </Eq> </Where> </Query> </View> to return all ...


4

Why create a custom login page when you can achieve this by breaking the inheritance permission on that document library. Break the inheritance permission on the document library and grant permission to only those users/groups that should have access to the document library. Users/groups not granted access to this document library, will pop-up window asking ...


3

Is this behavior for all users or only few and what about browser? In the real world scenario it should work, just make sure the Enable Client Integration at web app level. Central Administration > Application Management > Manage Web Applications > select the web application > Click Authentication Providers > select default zone, and select Yes for ...


3

In order to return list url you could utilize List.RootFolder.ServerRelativeUrl property. Some recommendations From performance perspective prefer server side filtering over client side one, the example below demonstrates how to query lists filtered by BaseTemplate: /_api/Web/Lists?filter=BaseTemplate eq '101' Example $.ajax({ url: ...


2

Recently I answered a very similar question here. If you need all of the folders and subfolders (but no documents) recursively from a document library, that is what you should use (send it via POST to the server due to GetItems method call): /_api/web/Lists/GetByTitle('Title of your doc. ...


2

Use query.ViewAttributes = "Scope=\"Recursive\"";


1

You can try this, or the equivalent in Powershell: SPList list = site.RootWeb.Lists["YourListName"]; SPField field = list.Fields["Name"]; field.CalloutMenu = false; field.CalloutMenuAllowed = SPField.ListItemMenuState.Prohibited; field.ListItemMenu = true; field.ListItemMenuAllowed = SPField.ListItemMenuState.Required; field.Update(); list.Update();


1

The problem is probably that SPRoleAssignment is using the ID of the passed in oUser, but the user with that ID in http://<<server>>/websites/gwp/ is very unlikely to be the same user as the one with that ID in SPContext.Current.Web unless SPContext.Current.Web is http://<<server>>/websites/gwp/. So you need to change ...


1

Here is the official SharePoint Limits and Boundaries https://technet.microsoft.com/en-us/library/cc262787.aspx#ListLibrary From this we can make few assumptions and calculate number of libraries per Site Collection ~ 2 Million maximum theoretical or practical number of libraries in a site collection


1

You can use PowerShell as below $site = get-spsite http://sitecollectionurl foreach($web in $site.AllWebs) { $libraryName = "DocumentLibrary" $list = $web.Lists[$libraryName] if($list) { #logic to update the library; like modifying field information etc. } }


1

Using JavaScript you can get ID using var list; ExecuteOrDelayUntilScriptLoaded(Start, "sp.js"); function Start() { var currentcontext = new SP.ClientContext.get_current(); list = currentcontext.get_web().get_lists().getByTitle('ListTitle'); currentcontext.load(list, 'Id'); currentcontext.executeQueryAsync(Function.createDelegate(this, ...


1

I think that depends a lot on how your project is structured and your deployment process. In scenarios like this, I use feature activation code to provision my document library with a GUID generated by the Visual Studio tool. Then in my code I reference this GUID where necessary. Then once the feature is packaged, deployed, and activated, it is consistent ...


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 } } }


1

As Michael says above, a default value only occurs at default, it doesn't change values if one exists. Can you use a SPD workflow to change the value? How are you moving the document? I would imagine that at the worst, you could setup a workflow to run on update and if the value of the field you are looking at is 0815, change it to 999. No update would ...


1

Pretty sure that if the newest version is a minor version, that will not be deleted when using that. You could try creating a new major version (it would be the newest version, then "delete minor versions", which should remove all minor versions). I just tested the above scenario and this worked for me.


1

You can use PowerShell to get this information Function GetFiles($folder) { Write-Host $folder.Name foreach($file in $folder.Files) { Write-Host $file.Name } foreach ($subFolder in $folder.SubFolders) { GetFiles($Subfolder) } } $web = Get-SPWeb http://weburl $list = $web.Lists["ListName"] ...


1

If you are using SharePoint on-premises you can't create the library and the custom columns in a single call using the REST API. You need to make a call to create the library and then make subsequent calls to create each of the custom columns. The REST API in SharePoint Online now supports batching so you can create the library and the custom columns in a ...


1

I don't think you can create fields (columns) in a list/library at the same time when creating it as the REST endpoints for list/library and fields are different. So you will have to first create your document library and then add fields to it. The Fields REST API reference on MSDN is a pretty comprehensive guide on how to create different type of fields. ...


1

I'm not sure if a column can be created at the same time, but perhaps this example will guide you on how to create a column: // Create a new list field function createField() { var fieldName = document.getElementById("createlistfieldname").value; var executor; // Initialize the RequestExecutor with the app web URL. executor = new ...


1

You can configure Incoming Email for the document library where you want to save the documents, once you configured the incoming email you can send mail to list so that it will save attachments to list. Follow steps here to configure Incoming email for your farm and to configure settings for library


1

If you have the excel Service enabled then this problem is most probably with ASP.NET Impersonation. Solution: Disable the ASP.NET Impersonation at the Server level and "SharePoint Web Services" level. Via: IIS > Authentication > ASP.NET Impersonation -- Microsoft Knowledgebase entry IF no ECS configured in the farm then check this



Only top voted, non community-wiki answers of a minimum length are eligible