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

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); ...


3

In SharePoint 2013, client-side rendering (CSR) provides a way to control the output/design of your fields and set of controls by leveraging HTML and JavaScript technologies for example how should the fields render in list views (edit, new or quick edit), search, list forms etc. Now, every field definition comes with JSLink property that can be overridden, ...


3

Structural navigation is tightly coupled with the content and therefore it is hard to create friendly URLs. However, managed metadata navigation addresses this issue by providing central way to manage navigation, irrespective of location of content, which makes it easy to create friendly URLs. The only con, navigation will be managed by term store. You can ...


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


2

First I am assuming that you're using SharePoint 2013. I would suggest you to use SharePoint's Client Side Rendering Framework. I would suggest this blog to understand how to apply CSR. The code which you can write to modify column names is as below (I am currently modifying "Title"): (function () { function preTaskFormRenderer(renderCtx) { ...


2

If you have a page, "page1.aspx" in the pages library, it can be accessed via: http://site/pages/page1.aspx. But, perhaps you would rather be able to access it via: http://site/page1 The above would require some sort of routing table. This routing table could have been implemented in a variety of ways, but they happened to decide to use a term set for ...


2

The command below always helped me to take backup of entire farm. Backup-SPFarm -Directory C:\Backup -BackupMethod full -BackupThreads 10 -Force Source: here and here If you want a script which will take backup regularly, I'll suggest you to check this script. It's for SharePoint 2010 but I don't see any reason for it to not work with SharePoint ...


2

Alex, I think it's going to depend on when you need the recurring task to execute. If you're okay with it running on a timescale (e.g. hourly, daily, etc), you can use Timer jobs. If you need to be based on an activity (e.g. list item updates), then you'll need go with a workflow or event receiver. For a daily recurring task, you can go with a single Timer ...


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

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

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

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

John, All of the examples I've found online tell you to use the Managed Navigation approach. I found a video tutorial and step-by-step instructions that are quite similar. Managed Metadata Navigation in SharePoint 2013 SharePoint 2013 – Navigation using Managed Metadata (Term Store)


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


1

@Arsalan is correct. SHA-1 is being phased out. Google is also phasing this out as well, and Microsoft has said it will not support them after Dec 31, 2015. This basically correlates to 1024 bit encryption (SHA-1) and 2048 bit (SHA-2) encryption (SHA-2). Also note that you need to ensure all your intermediate and root certificates are updated. If you ...


1

You can get list of site collection in Office 365 using CSOM var token = TokenHelper.GetAppOnlyAccessToken("00000003-0000-0ff1-ce00-000000000000", tenantAdminUri.Authority, null).AccessToken; using (var clientContext = TokenHelper.GetClientContextWithAccessToken("https://yourtenant-admin.sharepoint.com", token)) { var tenant = new ...


1

That should work for most needs. You don't have some of the template features for the look and feel, and a lot of the advanced document management stuff isn't in Foundations, but basic document libraries are there and that works for most people's needs if they just want a repository.


1

The reasons to use content types rather than adding columns: If you have two disparate types of information in one list/library. ex: A list that has purchase requests for new employees and for new equipment. If you are going to use the same type of information on multiple sites/lists/libraries. ex: You have a content type that inherits from document that ...



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