Tag Info

Hot answers tagged

6

Getting only the current user won't be enough to get user profile properties. You need to use the PeopleManager as well. Your code should look something like this: var context = SP.ClientContext.get_current() var web = context.get_web(); var user = web.get_currentUser(); var peopleManager = new SP.UserProfiles.PeopleManager(context); var personProperties = ...


5

If you can whip up a console app and schedule it and it does the job - then great. I probably would rely on PowerShell. I prefer being able to monitor and alter scripts if needed without having to recompile or open up VS to make the edit. When working with data I've also used SSIS packages on SQL server. If you are running SharePoint locally you have an ...


5

I guess you could always use a site collection token in your URL. ~sitecollection URLs and tokens in SharePoint 2013 If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint Update Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to ...


3

Those are not log files, it's your actual search index. It is recommended to move the index to it's own drive so that the index (or any other log files) cannot consume all disk space on the C drive. Moving the index means that you need to clone the search topology and then move the clone to another drive. This is kind of a complicated procedure as you have ...


3

Since I have to load the userprofile script, I had to use: SP.SOD.executeFunc('userprofile', 'SP.UserProfiles.PeopleManager', function() { var clientContext = new SP.ClientContext.get_current(); var personProperties = new SP.UserProfiles.PeopleManager(clientContext).getMyProperties(); clientContext.load(personProperties); ...


2

I would try the following: Get the List again from the elevated Web instead of the instance you pass to this method. Try searching your eventreceiver additional by assembly or classname to make sure you don't delete some SharePoint internal Receiver. finally{ web.AllowUnsafeUpdates = false;}


1

You need to Download SharePoint Online Management Shell and SharePoint Online Client Components SDK in order to work with SharePoint Online using PowerShell. Then you can write PowerShell code and execute it in SharePoint Online Management Shell. Following sample code creates a list (Document Library) in SharePoint online. #Import the required DLL ...


1

Audience is not equal to Security! Audience on pages is mainly for showing / hiding the page from for example the current navigation, users will still be able to find and edit the page through links and site content for example


1

Audiences have to be built and compiled before they can be used. Audiences are built in the User Profile Service area of Central Administration and are based on user profile properties. For example, you could create a Marketing audience where the membership includes everyone with the Department of Marketing. Once defined and compiled, it is available in ...


1

Mark, See if this can help you. If you are writing the custom code this can set you the starting point.


1

Below script will upload file recursively from folder to document library if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } Function UploadFiles($web,$path,$docLibrary) { $files = Get-ChildItem $path foreach ($file in $files) { if($file.GetType().Name -eq "DirectoryInfo") { ...


1

This ended up being an easy fix. For a more complete answer, I want to mention that this was happening on a MySite collection. I activated the SharePoint Server Publishing Infrastructure and SharePoint Server Publishing features at the MySite site collection level. That brought back most of the missing apps for all MySite users. The last issue was the ...


1

You can do that by edit the current view "Task Summary" and add your custom field, like this:


1

I do not understand your question ~remoteAppUrl is the Token you insert for and the matching will be done in SharePoint with the information you provide on /_layouts/15/appregnew.aspx


1

my issue got resolved with help of below link https://dotnetadil.wordpress.com/2012/04/11/sharepoint-item-deleting-event-receiver-deny-delete/ I used below code public override void ItemDeleting(SPItemEventProperties properties) { base.ItemDeleting(properties); using (SPWeb web = properties.OpenWeb()) ...


1

It heavily depends on the URLs which are configured to access your SharePoint sites. I would guess that you access your Intranet-SharePoint via a non-FQDN URL (e.g. http://intranet) and your Extranet-Site via FQDN (http://extranet.company.com). Internet Explorer does an automatic zone detection. If my assumptions match your environment, IE will assign your ...


1

John, if you are creating the site columns from the visual studio use the DisplayName property of the field for your case <Field ID="{2690E8BF-0801-408A-8445-93D816DF5D29}" Name="LastName" DisplayName="Last Name" Type="Text" Required="FALSE" Group="Custom Site Columns"> </Field> <Field ...


1

It behaves that way because that is how the search display template works, if it has a title, it shows it, otherwise it falls back to the file name. Title is by far one of the highest ranking priorities in the search algorithm. If you find your results lacking, giving documents accurate title is the best way to boost relevancy. Name is the file name, title ...


1

Use SharePoint:SPSecurityTrimmedControl with PermissionsString="FullMask". Then only users with full control or site collection administrators will be able to see the Gear icon for site actions, but this will hide all site actions menu . <SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl1" PermissionsString="FullMask" runat="server"> ...


1

If you export the web part and locate the JSON string that contains the "refinerConfigurations" you can change the "useDefaultDateIntervals":false and then set your own intervals like "intervals":[-365,-180,-30,-7,-1]. Dates in the past are negative and the future are positive. If you don't know how to export and import a web part let me know and I'll add ...


1

You can't delete the copy because it is associated to the Seattle.html file. What you have to do is create a copy of the Seattle.html file to. This will create a copy of the html file (Seattle_copy(1).html) that you need to rename to anything you want, maybe "delete" as an example. Doing this will give you a dialog that asks if you would like to update the ...


1

It's mostly likely because you already have an instance of the SPList (from another context) before you try to execute the deletion of an EventReceiver. That's why the ThreadAbortionException is thrown. Instead of sending in the list, send its name instead and get the list inside the RunWithElevatedPrivileges codeblock. private void ...


1

You have two options: Create a timer job. Is is similar to console application, that is run on periodic basis and is managed by SharePoint. Here is a tutorial how to create one. Cons: you will have to implement custom logging if you need one; it is not friendly to start it manually, etc. From architecture perspective: timer jobs are global artifact on ...


1

The problem lies as you are updating Title with Name, the .aspx extension is also getting appended. Try updating the page name to something else and if it works then do a string manipulation in the workflow so that .aspx doesn't get included when you are copying the Name to Title. Please share your results for the solution, maybe I can help you better if it ...


1

In my experience you need to emulate what you get when you do a read (which you can see using a tool like Fiddler). In your case the code would be: var someNumbers = [4, 5]; var itemMetadata = { '__metadata': { 'type': archivo.d.ListItemEntityTypeFullName }, 'GerenciaId': $('#gerencia').val(), 'Planta_AreaId': $('#planta').val(), ...


1

In the View Settings: Add the Created and Modified dates to your view open the Group-By section and group by the your date field. sort Descending Open the (View) Totals section (below the Group By) and Total by Count for your date field


1

As Client Side object model runs with the current user credentials and you mentioned that the farms are on different AD's altogether. You'll need to manually provide some credentials who have access to the farm from which data needs to fetched. Either you can ask the user for credentials in a popup or you can manually give them (Security Risk). Cross Site ...


1

SharePoint provides a Custom Action class, please read SP.UserCustomActionCollection Class. var context = new SP.ClientContext.get_current(); var list = context.get_web().get_lists().getByTitle("stackoverflow") var customAction = list.get_userCustomActions().add(); customAction.set_location('CommandUI.Ribbon.ListView'); var uiExtension = ...


1

Please include Microsoft.SharePoint.Client.Runtime.dll in your project.


1

Adding a server into does not required the down time at all. Because all the operations will be performed on the new server. But when it comes to configuring the services on server then may be you see the some down time. when you change the search topology this may cause the search outage but not farm outage. if you adding another WFE and using the ...



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