Friday, July 31, 2015

Error Saving JavaScript Files to SharePoint Mapped Drive – Minor Version Overload

This is a first. I was editing away in Sublime Text today and suddenly I couldn’t save my code to the mapped S: drive I was using in SharePoint 2013. S: is for SharePoint. Get it?

The error message on the PC side wasn’t all that helpful, as one might expect. (Sorry for the crappy captured image.)

Can't save files from Sublime Text

The files I’m editing are stored in:

http://[Server Name]/sites/[Site Collection Name]/_catalogs/masterpage/_[Client Name]

I’ve found that putting all of my project artifacts in that one location works well because I can easily copy and paste from one environment to another, as needed. I have a folder per artifact type, such as

Master Pages, html, js, css, Display Templates, Page Layouts

etc. I know someone is going to tell me what a horrible idea that is, but it’s not horrible if it works. And it works.

I’m editing within a virtual machine in VMWare Workstation running Windows 8.1 because I can’t connect to the client’s VPN with Windows 10. I originally was using a HyperV VM, but when I installed the production release of Windows 10, that went defunct on me, too. (Yeah, all that’s a mouthful.) Given all that, a restart of the VM seemed like a good idea.

No joy.

The next thing I thought of was that the disks might be full on the SQL server. I’ve seen that wreak all sorts of havoc in the past. But my admin buddy told me everything was humming along and healthy.

My next move was to download SharePoint Designer onto the VM and try editing the files there.

Aha! When I tried to save my edits, I got this message, which I had never seen before:

Minor version limit exceeded

Because my files are in the _catalogs/masterpage folder, we inherit versioning and Check In/Check Out. That’s a good thing because I can always restore an older version if something dreadful happens.

Clearly this has been a project with a lot of Ctrl-S action. It turns out that I had 510 minor versions on one file, and that’s the limit. Nada mas.

Too many minor versions

As soon as I published a major version (in this case, the magical 1.0), I was back up and running.

Yeah, I probably should clean out all those old versions at some point, but disk is cheap.

BTW, this is a really cool project where I’m using KnockoutJS, KO,mapping, fontawesome, jQuery, jQueryUI, jQuery.cookie, fullcalendar, MomentJS, and more. It gets us a pretty and highly useful veneer over basic SharePoint functionality to match the business needs as exactly as possible.


by Marc D Anderson via Marc D Anderson's Blog

Restore Navigate Up on SharePoint 2013

As one of the most popular blog posts ever on our Manage Projects on SharePoint blog, this post, written by my colleague Jonathan Weisglass, will hopefully help the SharePoint community too, or anyone who struggles on the topic! Would love to hear any feedback of comments too. Enjoy! 

*****

With every new version of SharePoint, one of the things that we have to do is work out the implication of various features being pulled or deprecated. You can find a TechNet article on the subject here.

With SharePoint 2013, the removal of the Design view from SharePoint Designer is probably one of the biggest. One that really surprised me was the removal of the Navigate Up menu that replaced the site breadcrumbs in SharePoint 2010. This article will tell you how to bring it back.

This is the Navigate Up menu in a 2010 site.

2010-Nav-Up-Menu

At BrightWork, we have always seen SharePoint as something that should be structured hierarchically, with parent sites and child sites. It seems that our friends at Microsoft see sites as islands. It may be the ability BrightWork has to report across multiple sites and lists that has made us see SharePoint this way!

hierarchy

Anyway – back to how to bring back the Navigate Up menu to a SharePoint 2013 site. You will needSharePoint Designer 2013 for this. To appreciate it, you should create a hierarchy of a few sites and apply the change to the site at the bottom of the hierarchy.

  1. Open the SharePoint 2013 site in SharePoint Designer.
  2. Create a copy of the seattle.master.
    Note: It is important that you make a copy for reasons that I explain at the bottom of the post.
    seattle-master
  3. Open the seattle_copy(1).master for editing and search for class=”ms-breadcrumb-dropdownBox” – it should be on line 368.
  4. Delete the style=”display:none;” at the end of the line.
  5. Delete the Visible=”false” immediately underneath.
    Essentially you:
    change
  6. Click Save.
  7. Make the seattle_copy(1).master the default master page.
    make-master
  8. Return to your site and refresh. You should now have a Navigate Up menu in the Top-Link bar!fini

Note: One side effect of making a change like this is that the new Change the Look Feature seems to stop working. As far as I can make out, this will happen if you make a change to the default master page. This is why I got you to make a copy of the master and use that too make your changes.


by Ciara McDonnell via Everyone's Blog Posts - SharePoint Community

Thursday, July 30, 2015

6 Things You Need to Know About How Companies Are (and Aren't) Using Office 365

Skyhigh has released a report that includes some interesting data points about Office 365, SharePoint, and the ways in which organizations are (and aren’t) making use of the productivity and collaboration platforms.

read more


by via SharePoint Pro

The SharePoint Maturity Model, with Expert Melinda Morales

For those of you unfamiliar with the event, Microsoft holds an annual internal conference called TechReady that pulls together the latest from internal teams, as well as some outside speakers, on basically every product area. People fly in from around the world to participate and get some technical training. Well, its been happening all this week, taking place in downtown Seattle at the Washington Convention Center. My 'Hello World!' moment in the SharePoint community happened shortly after joining Microsoft back in 2006 as part of TechReady, when I was invited by my team member Joel Oleson to help present on the topic of SharePoint governance. It was not new subject-matter for me -- I have been involved in corporate and platform governance initiatives since the mid-1990s, but this was my first foray into the topic with the SharePoint audience. And in 2006, that audience was not very receptive. Governance was still viewed as a "nice to have" activity in 2006.

We've come a long way, baby.

I connected with Melinda Morales (@TrulyMelinda) sometime last year -- I believe it was through some webinar feedback of some sort. At the time, Melinda was leading the governance efforts for a massive SharePoint deployment at Sony Electronics, and providing expertise on the topic to the various Sony divisions. We kept in touch, and when the timing was right, she moved with her family to the Seattle area -- and then I hired her. Melinda is now a consultant with GTconsult, located in Bellevue, WA and focusing largely on helping organizations implement sound governance practices. I asked Melinda to share some detail behind her latest project: the SharePoint Governance Maturity Model, which is something every organization needs to at least take a look at and consider.

[CB] Melinda, what is your background, and how did you get involved in SharePoint? You know… how long have you been working with it, what is your current role, etc?

[MM] Thanks Christian. This is exciting! I’m a business analyst and member of the awesome A-team at GTconsult. Yes, it is as cool as it sounds. I get to help organizations of all different shapes and sizes discover the fun of the world of SharePoint and guide them through their journey. I’ve been working with SharePoint since 2007. I got my first taste of the kool-aid when I was just a little power user at Sony Electronics (SEL) after which I spent the next 8 years growing into new SharePoint dedicated roles and ultimately becoming their business-side platform owner. While with Sony I got to interface with all levels of the organization and really got a good idea of the many different ways users interact with and sometimes even become frustrated with the toolset. I took it as my personal goal to help make transitions easier and to advocate for the users with every step. I still work towards that goal in every project today.

[CB] You’ve recently started writing for ITUnity and started up your own blog, with a strong focus on governance. There is a ton of great information in your posts, and some very practical examples of how to get started. What is your experience, specifically, with SharePoint governance and what is different about your perspective?

[MM] I really am just a newbie to the great big SharePoint community but am super inspired to become involved and learn from all the great people out there. I initially started sharing my experiences, both successes and failures, with SharePoint governance through my involvement with local SPUG’s. I heard over and over again, as I’m sure many people do, that governance is often a struggle and ends up as a huge hindrance when organizations are trying to progress their SharePoint deployments.

As I mentioned before, I am big into user advocacy and governance falls perfectly in line with that passion. Through my time at SEL, we went from having a big ol’ spaghetti mess of an environment to a streamlined and closely monitored business-critical platform. The biggest win in that journey was our approach to governance. We took the long road and had many stops and starts but ultimately the shift in focus to a collaborative, user-centric approach is what made the win for the team.

Over the years while sharing my governance journey, I had a ton of great discussions with people from several different organizations and came to realize that not only was what I experienced with SEL exactly what others experience, but the approach that was successfully implemented was quite intriguing to others. It looked like there was a need for others to be able to leverage my experiences and hopefully help them avoid taking the longest route to success.

Before I get to the answer of what differentiates my preferred governance approach, let me just put a disclaimer out there. I don’t think my approach is really “different” only because there is no one way to tackle SharePoint governance. It is very much a unique journey for each organization and should be approached as such. There are simply too many moving parts to have any kind of one way or the other discussion. That said, there is one thing that I think has defined the success of the approach I prefer – what I call collaborative governance. The most successful governance strategies I have seen all have an aspect of business and IT teams working together toward a common goal. My approach is centered around fostering this relationship.

[CB] I think that's a great point. I think a lot of people are looking for a tool or a magic list of "must do" requirements that will solve all of their problems, but governance is one of those areas where the infamous SharePoint answer of "it depends" really does apply. In your opinion, what is the general state of governance in the SharePoint community? We’ve been talking about it for many years now – is it even still an issue with most organizations?

[MM] Governance is one of those topics that just will not go away, right? It’s like that stuff that gets stuck on the bottom of your shoe. You try to shake it off or scrape it on something but it just won’t go away and actually ends up spreading all over the place. There’s a pretty visual for you. In all seriousness, governance is still a hot topic and will remain a hot topic because it can make or break your SharePoint deployment. No matter how you are using the features of the platform, you will come up against governance at some point. It doesn’t have to be a problem, though. One thing that Office 365 and the mobile first/ cloud first strategy has done is force us to broaden our horizons when it comes to governance. For a long, long, long time we approached governance as an IT security control and nothing more. Today we as a community are finally starting to open our eyes to the fact that it is much more (even though great people like yourself have been telling us this very thing for years).

[CB] You’ve developed a SharePoint governance maturity model, which reminds me of the SharePoint Maturity Model (SPMM) developed a few years back by Sadalit Van Buren, who is now a Partner Technology Strategist at Microsoft. Do you borrow from Sadie’s model, or is this different? Can you walk us through your methodology?

[MM] Ahhh, yes. Please allow me to fan girl for a moment. Sadie’s SharePoint maturity model is such a great tool. I actually used it to help with roadmapping during my time at Sony. I highly recommend it to anyone who is looking for a great way to illustrate their SharePoint deployment’s level of advancement, especially when transitioning from 2010 to 2013.

I was definitely inspired by the ease of illustration through the use of a maturity model when introducing a new framework. While the maturity assessment method I used is similar to many maturity models out there, the areas of measurement are completely focused on governance. The SharePoint governance maturity model is very specialized and focuses only on the core framework for growing into a collaborative governance strategy.

In the assessment in particular, we take a look at four major pillars of a holistic collaborative governance strategy - Foundation, Administration, Communication and Adoption – and how you get from being in a chaotic, ungoverned position to implementing a cohesive governance strategy.

Aligning with this maturity framework means you will explore:

  • team formation
  • priority setting
  • policy
  • platform structuring
  • security
  • growth of soft skills
  • establishing ownership
  • user empowerment
  • reporting and monitoring

There is a great deal of detail on each of the pillars available in a free whitepaper over on the GTconsult website!

[CB] I'm always a fan of the self-promotion! The fact that I helped write the paper is icing on the cake. But back to the topic -- I’ve always felt there is a huge gap between guidance from the “experts” and the practical application of governance. You and I have talked about this on numerous occasions. People tend to gravitate toward tools and technology rather than solve the fundamental issues that cause governance problems. What is your approach with customers that only seem to focus on the tech?

[MM] I second that emotion! Governance consulting is a hard nut to crack, I think. It is a pretty long, involved process and requires a lot of hands-on work. The focus on tools and tech, in my opinion, stems from the need to have a quick fix. I seriously think this contributes to why governance has remained such a hot topic for so long. In order for governance to be successful, you have to build a strategy. Unfortunately this sometimes means the need for governance gets deprioritized because resources are tight and there is no quick fix tool to slap on and be done.

I have to say, I don’t think I have had a customer that WASN’T focused on the tech. One of the things I love to do with customers is to dive in and do some discovery involving their users and site administrators. Most often IT is the team doing the inquiry into governance and perhaps solely owning the SharePoint space which usually leads to a little bit of a narrowed view of how the platform is being used and what it is being used to accomplish. Having sit downs with business users is always an eye opening experience and also serves as the very first opportunity to start bridging some of the gaps that may exist between the two “sides” of the platform. It is not as scary as it sounds. There are absolutely ways to facilitate these discussions in a positive manner and the output is uber valuable – and usually ends up steering your aim toward process instead of tech!

[CB] Rarely do organizations have a clean slate or a brand new SharePoint deployment on which they can build the perfect governance framework. The reality is that governance is often mentioned only after problems pop up. Suddenly there is some kind of data breach (yes, I went there…but I’m not naming names) and the executive finally recognizes that governance is not an unnecessary cost. Where do you go from there? How do you apply your maturity model to that scenario?

[MM] “…………….” Is my answer to your not so subtle call out. And you can quote me on that!

Data breaches, accidental leaks, audits, user adoption decline, user dissatisfaction. I have seen all of these as catalysts leading to governance discussions. It is very common to not even realize you need governance until you NEED governance. That seems to be the nature of the beast because of SharePoint’s epic ability to touch every part of our organizations without administrators even realizing it is to that point.

Let me start by explaining a little bit more about GTconsult’s governance strategy focused workshops (called Jam Sessions). We engage and explore, make recommendations then help implement and coach. The governance maturity model is just one of the many tools used during our discovery phase. It is a good way to get an idea of where an organization is in regards to implementing a holistic, collaborative governance strategy and how far they may need to go to get to where they want to be. All of our governance offerings start with this basic discovery. This enables us to jump in and assess governance at any stage then help to define the “Where do we go from here?”

Along with a picture of where the organization is currently with respect to governance, we also conduct several other discovery exercises including a technology culture assessment. This allows us to get a good understanding of where potential roadblocks may be and who the key players are. I recommend this kind of discovery for anyone looking to start down the path to governance, even if it is in response to a large event on a mature environment.

If anyone wants to take a gander, the tool is available for anyone to use in order to help kick start discussions on governance strategy as a whole and can illustrate a clear, defined path to achieve results. http://ift.tt/1JxlDzF

[CB] Back to your more recent content – what are you writing about these days? What are your most recent posts?

[MM] Over on my blog http://ift.tt/1KBYj2p , I try to keep up with posting and have a variety of topics. There is a pretty cool walkthrough on a mechanism for measuring user knowledge in SharePoint and one of my favorite posts “Smile, Your Users are Watching. The #1 Soft Skill for the IT Pro” because it’s just fun and something that people forget. I also plan to write some on the Windows 10 experience, wahooo!

I find inspiration in the wackiest places sometimes (such as my 4-year old son playing Minecraft) so you never really know what will pop up on my blog.

Thanks again to Melinda from pulling yourself away from Minecraft with your son to answer my questions, and for sharing links to such great content. You can reach her at melinda@GTconsult.com, on Twitter at @TrulyMelinda, or visit her blog at www.TrulyMelinda.com. As I mention above, the Governance Maturity Model whitepaper with free assessment survey are things that every organization need to review. There is always room for improvement, and Melinda and the GTconsult team have made it easy to create your baseline.


by Christian Buckley via Everyone's Blog Posts - SharePoint Community

Wednesday, July 29, 2015

#SP2015-27: Latest News about Microsoft, SharePoint and Office 365

Hello SharePointers and welcome to the weekly SharePoint Community newsletter with the latest news on SharePoint & Office 365.

Windows 10 Free Upgrade Available in 190 Countries Today

Today is the day when Windows 10 is finally available to everyone! Read more about the latest version of Windows on the Windows blog!

http://spvlad.com/1JRDRro

 Review of Harmon.ie Collage: The First ‘Go To’ app for the Digital Workplace

Read this review by SharePoint MVP Vlad Catrinescu on the latest app by Harmon.ie called Collage. harmon.ie Collage presents all the information workers need to do their jobs, in a single-screen. With Collage, workers have email, updates from business apps, documents, and social tools in one app

 http://spvlad.com/1fH9bkK

New PluralSight course: Planning and Deploying Office Web Apps 2013

Vlad Catrinescu just finished his  first PluralSight course on Office Web Apps 2013! Office Web Apps Server is a new Office server product that delivers browser-based versions of Word, PowerPoint, Excel, and OneNote. In this course, you will learn what exactly Office Web Apps 2013 is, how it works and how you can install and connect it with Exchange, Lync, and SharePoint.

http://spvlad.com/1GlWQYU

Ready for SharePoint 2016? By Jeff Jones aka @spJeff

Get your environment ready to install SharePoint 2016 the day it comes out! Read this blog post by SPJeff!

http://spvlad.com/1SMOkJF

Why I’m Disappointed the Yammer Document Conversations Feature Has Been Cancelled in Office 365 BY ERICA TOELLE

Recently Microsoft announced that they will be cancelling the Yammer Document Conversations feature that had been previously in the “Rolling Out” category on the Office 365 Roadmap.!

http://spvlad.com/1VN4dUD   

Collab365 Global Conference - Call for Community Leaders

As you hopefully know by now we are well into the organisation of our latest online conference called the “Channel 365 Global Conference” (7th - 8th October). This conference will last 24 hours, featuring speakers from around the Globe who will discuss topics covering mainly Office 365 and SharePoint. We are also very confident of a massive turnout and are personally setting ourselves the goal of beating 10,000 registrations.

http://spvlad.com/1eA6fFE


by Vlad Catrinescu via Everyone's Blog Posts - SharePoint Community

Managing SharePoint Online with Powershell

In the course of Slalom helping clients move to the Office 365 cloud, I routinely use Powershell and it's SharePoint Online cmdlets (Office 365 & Azure AD cmdlets too!) to help manage their Tenant, both before and after migrations.  While the UI contains all the tools for managing an instance, it immediately becomes tedious to click through the same actions for more than a few actions.
While the amount of cmdlets are lagging in quantity in comparison to On-Premises SharePoint, we are given several that can help us save deployment and management time.  Below we'll walk through getting connected and then doing routine query transactions.
--Getting started
To get started there a few prerequisites needed to start connecting with SharePoint Online.  You can connect from either a desktop or server, depending on where you have access to.
  • Install PowerShell 3.0, if it's not already present (Server 2012 or Windows 8)
  • Install the SharePoint Online Management Shell, which will have the cmdlets we need
  • URL of your SharePoint Online Admin center (e.g. "http://ift.tt/1o7xudm", etc.)
  • An Office 365 account that has Global Administrator privileges
After all these are installed, launch the SharePoint Online Management shell as this removes the need to run the Import-Module cmdlet.  Here's the code we'll be working from in this example.
--Connect to SharePoint Online with credentials
Now that we're ready with the SharePoint Online shell, the first thing we need to do is create a Credential object.  On Line 1 below we call the Get-Credential cmdlet which pops a logon box for us to put our "xxx@xxx.onmicrosoft.com" and password, pushing that into an object for later use.  I then create a variable to store my Admin URL on Line 2 as well.
Using the above variables I then call the Connect-SPOService cmdlet on Line 3 passing them in to create a connection.  Running this now should return the command prompt with no errors, which means it connected successfully.  Note, with these online cmdlets no errors means success.  Red error text will show in the shell if there is an error, which means one of the variables are not correct so just check them again for accuracy.
--Pull Tenant information
With our connection to our Admin Tenant locked in, the first query cmdlet to call is Get-SPOTenant on line 5 which will output a list of all the Tenant property's that have been set including quota's and sharing status.
--Pull all Site Collection's
The next cmdlet we'll test is the Get-SPOSite one on Line 7 that pulls all our Site Collection's the way I have it setup with the current piping, or you can tell it just one that you want to look at by adding in the target URL before the -Detailed property.  Looking at the results returned, we can see last Modified Date, individual quotas, it's Title, and of course the sharing status.
--Pull all users for a Site Collection
Now that we have our list of Site Collection URL's, we can see all our users within that collection.  On Line 9 we create a variable for reuse later with our target URL, then on Line 10 we call Get-SPOUser passing in that Site Collection URL variable.  From the output below we can see that we were returned  a list of all the users in our Site Collection along with their Login Names and any SharePoint Security Groups they're attached to.  This can be very useful for checking who is in which SharePoint Security Groups for you site.
--Pull all Security Groups for a Site Collection
And finally, we can query a specific SharePoint Security Group to see all the individual users if we need to pull out all that have been created.  On Line 12 we call Get-SPOSiteGroup again passing in the Site Collection URL variable.  This final output shows us all the Groups, including Owners logins for managing and the users inside of them.  Another great way to check on your security settings.
Using these SharePoint Online cmdlets is a quick and repeatable way to query your Tenant to ensure security and settings are correct.  There are of course Add-xxx, Set-xxx, and Remove-xxx cmdlets to complement the Get-xxx ones I detailed above for making changes to your SharePoint Online instance during or after migration.
References:

by Craig Pilkenton via Everyone's Blog Posts - SharePoint Community

Tuesday, July 28, 2015

5 Ways New Yammer-Office Online Integration Boosts Document Collaboration

Social networking in the enterprise is great—people generating ideas, engaging stakeholders, sharing relevant content, efficiently integrating everything into a single document that includes everyone’s contributions … Wait—you mean it’s difficult to integrate all that enterprise social goodness into a file such as a Word doc? Microsoft apparently agrees.

read more


by via SharePoint Pro

RequireJS Arrives in SharePoint Online Build 16.0.4230.1217 (Or Earlier?)

A JAVASCRIPT MODULE LOADEREver watchful – and talented – guy that he is, my friend Paul Tavares (@paul_tavares) pinged me the other day on Twitter with a question.

Hey. Question. On your O365, did you add RequireJS as a SOD? Noticed it was registered when I looked at the page code the other day.

Paul has a Site Collection in my tenant that we share for R&D and I certainly hadn’t done anything, so we went back and forth on it a bit.

If you do a View Source on a SharePoint Online page, you may well see this line:

<script type="text/javascript">RegisterSod("require.js", "https:\u002f\u002fcdn.sharepointonline.com\u002f16148\u002f_layouts\u002f15\u002f16.0.4230.1217\u002frequire.js");</script>

This tells me that my tenant is on build 16.0.4230.1217. It’s on First Release, so it may be ahead of the build you see in your own tenant.

The net-net of that line is to load RequireJS if it is needed using SharePoint’s SOD (Script On Demand) framework. It’s a little funny to me that this is happening, because RequireJS’s primary purpose in life is to help load script files when they are needed (among other things).

The good thing here is that if you want to use RequireJS in your applications – as I am regularly now – it’s already there for you by default – in SharePoint Online, at least. Paul and I have no idea when it showed up, but it’s a good thing. The Microsofties ought to let us know when they add such a useful library!


by Marc D Anderson via Marc D Anderson's Blog

Office 365 Dev Tip – Office 365 Patterns and Practices – Notes from the field

Here’s another post in the Office 365 dev tip series. This time I’ll mention the Office 365 PnP core library, which is a really great library which you can (and in my opinion should)...

The post Office 365 Dev Tip – Office 365 Patterns and Practices – Notes from the field appeared first on Tobias Zimmergren's thoughts on technology and business.


by Tobias Zimmergren via Tobias Zimmergren's thoughts on technology and business

Monday, July 27, 2015

Office 365 Dev Tip – Getting Add-in (App) Information for Add-ins (Apps) on a specific Web

Here’s yet another quick tip for the CSOM developer in SharePoint online. I came across a discussion about retrieving information about which apps were used/installed on a certain site. There’s a lot of people...

The post Office 365 Dev Tip – Getting Add-in (App) Information for Add-ins (Apps) on a specific Web appeared first on Tobias Zimmergren's thoughts on technology and business.


by Tobias Zimmergren via Tobias Zimmergren's thoughts on technology and business

What PowerBI Can Do for Your Organization

Microsoft’s Office 365 platform is growing slowly but surely, with new features being added almost weekly. One of the more recent enhancements to the platform is the data visualization tool Power BI. This is a long-awaited feature that makes building data-centric solutions more viable, for more organizations, than ever before.

read more


by via SharePoint Pro

Office 365 Dev Tip – Getting all Apps from your Tenant App Catalog using the Office 365 (CSOM) API

Here’s another quick-tip when working with Office 365 / SharePoint Online CSOM. A lot of people have asked me by e-mail, comments and twitter on how to get information about their apps in their...

The post Office 365 Dev Tip – Getting all Apps from your Tenant App Catalog using the Office 365 (CSOM) API appeared first on Tobias Zimmergren's thoughts on technology and business.


by Tobias Zimmergren via Tobias Zimmergren's thoughts on technology and business

Sunday, July 26, 2015

Office 365 Dev Tip – Retrieve all tenant-level WebTemplates in your Office 365 tenant using CSOM

Here’s another simple and quick tip for Office 365 Sites development (SharePoint Online). In this post I’ll simply show how you can easily get the Tenant-level Web Templates and information about then. In recent...

The post Office 365 Dev Tip – Retrieve all tenant-level WebTemplates in your Office 365 tenant using CSOM appeared first on Tobias Zimmergren's thoughts on technology and business.


by Tobias Zimmergren via Tobias Zimmergren's thoughts on technology and business

SPJS-Utility updated with support for querying large lists

By request I have added support for querying large lists (over 5000 items) using “spjs_QueryItems” or “spjs.utility.queryItems” in SPJS-Utility.js

If you use this for example with the DFFS Plugin “Autocomplete”, and have hit this error:

The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator

You can now update SPJS-Utility.js to fix this problem.

Please note that these functions are undocumented and mostly used internally from the different SPJS functions and solutions. If you are interested in using these functions in your own code, dig into the code to discover how it works, or ask a question in the forum.

Download

You find SPJS-utility.js here.

Alexander


by Alexander Bautz via SharePoint JavaScripts

Office 365 Dev Tip – Get Subsite Count per Site Collection with the Office 365 (CSOM) API

Here’s a quick tip for when working with the .NET managed CSOM for Office 365 Sites (SharePoint Online). In a few cases and projects I’ve been involved with, I see code that iterates through...

The post Office 365 Dev Tip – Get Subsite Count per Site Collection with the Office 365 (CSOM) API appeared first on Tobias Zimmergren's thoughts on technology and business.


by Tobias Zimmergren via Tobias Zimmergren's thoughts on technology and business

Friday, July 24, 2015

Partners Share the Secrets to Office 365, SharePoint Success

There’s certainly no dearth of information about business-focused technology out there. The trick is finding information that will help you make decisions about technology for your own organization.

read more


by via SharePoint Pro

Thursday, July 23, 2015

ChangeBot’s PowerShell Activity – Set an AD Group as Site Collection Administrator

This post is the first in a series where we will look at how to accomplish certain tasks utilizing ChangeBot’s PowerShell ActivityChangeBot already offers you 50 (70 if you use our ExCM product) activities to accomplish a plethora of site administration and user change request actions. If something you want to accomplish can’t be done via one of those activities, then the PowerShell activity can come to the rescue. 

With the combination of ChangeBot’s already powerful activities and the ability to run a PowerShell script as an activity – there really isn’t much that you can’t automate, audit, and run through a proper approval process, when utilizing ChangeBot. You might even have existing PowerShell scripts you need to occasionally run, why not put official procedures around the process and let ChangeBot execute the PowerShell scripts via a user request form.

This first example will cover how to add an AD group as the secondary site collection administrator.  This is something you can’t even do in the manual process of creating site collections via Central Administration.  You can however accomplish this via PowerShell – and thus you can set it as part of your site collection provisioning request profile.

Let’s say you have a team of administrators in an AD group called SCAdmins that belongs to the AWBIKES domain.  The PowerShell script to add that group to a site called extranet.awbikes.com would be:

set-spsite -identity http://ift.tt/1GIhXEQ -secondaryowneralias "awbikes\scadmins"

You of course want this to happen during the processing of every new site collection so the url will always be different.  You will utilize the “Set Execution Property” activity to create a variable with the full url of the site so that you can use it in the PowerShell script. (note: this step may vary depending on your specific request profile, this example is utilizing the activities and properties present when using the default Site Collection request profile we ship with ChangeBot).

In the Set Execution Property you simply need to combine the WebApplicationURL and SiteUrl properties to create a new variable we will call FULLUrl.

SetProperty

With this in place you can now create the “Execute PowerShell” activity and place your script in the box utilizing the above created variable.  My example script is:

set-spsite -identity $Properties.FUllURL -secondaryowneralias "awbikes\scadmins"

PowerShellActivity

Now when a new site collection is requested it will automatically assign your AD group properly every time.  That’s the power of ChangeBot.


by noreply@blogger.com (Aaron Wood) via SharePoint Solutions Blog

Moving from SPServices to REST, Part 4: Converting GetListItems to REST

This entry is part 4 of 4 in the series Moving from SPServices to REST

Summary: Because of the significant inconsistencies in the SOAP Web Services, converting your calls to REST will be a different process for each of them. In this article, we’ll look at the real workhorse of SPServices: GetListItems.

When my mechanic works on my car, sometimes he tells me about some different tires or parts I might consider instead of what was on the car since I got it. It might be to improve performance or to give me a bit more life out of the car than I might get otherwise. (I have a good mechanic.)

Officina Meccanica by efilpera http://ift.tt/1MLbNZO

Photo credit: Officina Meccanica by efilpera http://ift.tt/1MLbNZO

As I’ve suggested in prior articles in the series, you can start moving individual calls from SOAP to REST anytime that you decide. If you’re still running an older version of SharePoint (no shame there), then it probably won’t be until you upgrade to SharePoint 2013. If you’re already on SharePoint 2010 or 2013, then you can start anytime.

When it comes time to converting some SOAP calls to REST calls, what will that process look like? In this article, we’re going to take a look at converting the workhorse of the SOAP Web Services: GetListItems.

GetListItems lets us read items from a list or library (virtually all content in SharePoint is stored in a list or library – a library is just a fancy list that is document-centric). Even basic information about users is stored in each Site Collection in the User Information List. GetListItems does a lot for us in SPServices-based development; it’s the most-commonly used function by just about every developer who uses SPServices and it sits underneath most of the value-added functions like SPCascadeDropdowns and SPDisplayRelatedItems.

The basic structure of the simplest GetListItems call is this:

$().SPServices({
  operation: "GetListItems",
  listName: "Tasks"
});

We make a call to SPServices, specify the GetListItems operation, and specify the list from which we want to get data. That’s about it. The results of this call will contain the items in the Tasks list (in the current site) as they are displayed in the Tasks list’s default view, which by default would be AllTasks.aspx.

Usually we’d have a bit more code wrapped around this call, maybe something like this:

var p = $().SPServices({
  operation: "GetListItems",
  listName: "Tasks"
});

p.done(function() {

  // Process the response

});

Note that I’m using a promise above so that I know when the call has completed rather than making a synchronous call. More on that in a later article.

So what does the analogous REST call look like? It would be something like this:

$.ajax({
  url: _spPageContextInfo.webAbsoluteUrl +
    "/_api/web/lists/getbytitle('Tasks')/items",
  method: "GET",
  headers: {
    "Accept": "application/json; odata=verbose"
  },
  success: function(data) {
    success(data); // If the call is successful, process the response
  },
  error: function(data) {
    failure(data); // Do something with the error
  }
});

Not so different when you get past the sides and trimming, right? The specifics of what we’re asking for in the REST call are all in the url object. The way REST works is that we pass information about what we want the server to do for us as parameters on the url. In this case, we have:

url: _spPageContextInfo.webAbsoluteUrl +
    "/_api/web/lists/getbytitle('Tasks')/items",

This means:

  • Go to the context of _spPageContextInfo.webAbsoluteUrl, which is the current site. In SPServices, I figure this out for you, or you can choose to specify a different site with the webURL parameter.
  • Call the lists service: /_api/web/lists
  • Select the Tasks list using its name: /getbytitle(‘Tasks’)
  • And finally, get the items: /items

The rest of the REST call is just packaging and what we want to do with the result.

Where the two methods start to diverge more is when we start to request things in more specific ways, for example all of the outstanding tasks for a particular user. But there’s an imperfect isomorphism here. For virtually everything we can do with the SOAP Web Services, we can do the same thing in REST just by adding the analogous parameters to the REST call.

Here’s how some of the most common parameters in the request payload map from SOAP to REST:

SOAP Option(SPServices synonym) REST Comments
ViewFields(CAMLViewFields) $select Choose the columns you would like to retrieve. With both SOAP and REST we get some data we don’t explicitly request, but by specifying only the columns we need we can reduce the payload sizes.
Query(CAMLQuery) $filter, $orderby Specify which items in the list we would like to return and how we would like them sorted.
RowLimit(CAMLRowLimit) $limit Say how many items matching the Query we would like to receive. In SOAP we can specify 0 to get all matching items; in REST we can omit the parameter to get all the matching items. Otherwise, we can specify any integer as the limit.
ViewName(CAMLViewName) NA ViewName lets you choose the view you would like to get in the response. There’s no REST equivalent here. I’ve always discouraged using this option in SOAP because it’s too easy to change the view settings and cause unintended consequences.
QueryOptions (CAMLQueryOptions) NA In SOAP, this lets us specify some options that change how the data is returned to us. For example, we can ask for all of the attachment URLs rather than just a Boolean which tells us that there are attachments.
NA $expand This option in REST has no direct equivalent in SOAP. $expand allows us to indicate that we would like the values for a relationship – rather than just the indices – using a projection. This is important with Lookup columns and Person or Group columns.

References:

As you can see, it’s really not that scary. It’s the equivalent of translating Spanish into French, but even easier since all of the words are in English (sorry rest of the world – I’m going to play American on this one).

Here’s a slightly more complicated example where I’m asking for items from a Workflow Tasks list.

First, the SOAP request:

SOAPRequest

And then the equivalent REST request:

REST request for items from a Workflow Tasks list

Here’s how the two calls break down based on the table I showed above:

SOAP REST
CAMLViewFields <Viewfields><FieldRef Name=’ID’/><FieldRef Name=’Title’/><FieldRef Name=’AssignedTo’/><FieldRef Name=’RelatedItems’/>

<FieldRef Name=’Priority’/>

<FieldRef Name=’Status’/>

<FieldRef Name=’DueDate’/>

<FieldRef Name=’Author’/>

</ViewFields>

$select $select=ID, Title, AssignedTo/Id, AssignedTo/Title, RelatedItems, Priority, Status, DueDate, Author/Id, Author/Title
CAMLQuery <OrderBy><FieldRef Name=’Created’ Ascending=’False’/></OrderBy> $filter, $orderby $orderby=Created Desc
NA $expand $expand=AssignedTo,Author

Note that in the SOAP call, I get the ID and Title (name) of each person or group column automatically when I request the column value. If I needed any more information about those people, I’d have to read it from another source, like the User Information List or User Profile. I also can specify a CAMLQueryOption that returns more of the basic information about users, like email address, SIP, etc.:

CAMLQueryOptions: "<QueryOptions><ExpandUserField>True</ExpandUserField></QueryOptions>"

In SOAP, most options that we pass go in the request payload. With REST, some of the options – for instance, what format we’d like the response to take – go in the request header.

If we don’t specify an accept parameter in the header, then we get XML in the response. If you’re used to parsing XML, then that might make you happy, but we usually want JSON these days.

To get JSON, we specify:

accept: application/json; odata=verbose

On premises in SharePoint 2013, this is the only option at the moment. In SharePoint Online (Office 365), if we don’t want all the metadata that comes along with the verbose option, we have a couple other options.

accept: application/json; odata=minimalmetadata
accept: application/json; odata=nometadata

The best way to understand the differences between these options is to try them out. When payload size matters (and it usually does), you should think about receiving less metadata to reduce the size of the responses.

References:

It’s the nuances that will trip us up. In SOAP, we can’t join lists together; we have to pull the data from each list and do the “join” on the client side. In REST we have what are called projections – using $expand – that let us do some lookups into other lists, for example to get information from a lookup list.

But back to GetListItems. Here are some examples of REST calls to get data back from a Tasks list showing some common parameter settings.

Get all tasks assigned to me

/_api/web/lists/getbytitle('Development Tasks')/items?$expand=AssignedTo&amp;$select=Title,AssignedTo/Title&amp;$filter=AssignedTo/Title eq 'Anderson, Marc'

Note that the format of your username will vary based on how you have things set up. Using an account may be a better choice, but I wanted to make the example clear.

Get all tasks that have not been completed, showing the status and the % complete

/_api/web/lists/getbytitle('Development Tasks')/items?$expand=AssignedTo&amp;$select=Title,AssignedTo/Title,Status,PercentComplete&amp;$filter=Status ne 'Completed'

Getting the data in these various ways is of course just the first step. Once you have the data, you’ll have to process it in some way in order to display it to the user, do calculations on it or whatever you’re trying to accomplish. That part of the exercise isn’t in the scope of this article, so you’ll have to look elsewhere for tricks for those pieces.

In the next article, we’ll look at how JavaScript promises come into play with SOAP and REST. I hope that you’ve been using promises with SPServices calls since I added support for them in version 2013.01, but if you haven’t, moving to REST is an excellent time to start doing so.

This article was first published on IT Unity on July 23, 2015. Visit the post there to read additional comments.

by Marc D Anderson via Marc D Anderson's Blog

Wednesday, July 22, 2015

Download file from SharePoint document library C#

Download File from SharePoint Document Library C#

Lets see how to download a file from SharePoint document library using C#. Sometimes, we would want to download multiple files based on a pre-defined query such as a monthly report or a bulk download. We can use the explorer view, if it is a few files or if it is a complete folder or all the files in the document library. However, if we want to customize the query or automate the process, then we can use the below C# code to download the files programmatically.

  1. Use the standard object model to access the SharePoint site and web.
string siteUrl = "site url";
using(SPSite site = new SPSite(siteUrl) {
using(SPWeb web = site.OpenWeb()) {
       // code to download documents
}
}
  1. Access the document library using the web object from the above step.
// get the required document library SPList
docLib = web.Lists["Shared Documents"];
  1. Access the items to be downloaded and download the files.
// loop through each item or document in the document library
foreach(SPListItem item in docLib.Items) {
  // Access the file
  SPFile file = item.File; if(file != null) {
  // retrieve the file as a byte array byte[] bArray = file.OpenBinary();
  string filePath = Path.Combine("c:\\temp", file.Name);
  //open the file stream and write the file
  using(FileStream fs = new FileStream(filePath, FileMode.Create,     FileAccess.ReadWrite)) {
    fs.Write(bArray, 0, bArray.Length);
} } }

The above server side code can be used if you are using page code behind, event handler, timer job etc.

In case you do not want to download all the files, you can use CAML query to filter the items in a document library or even a site collection and loop through those items. If it is spanning multiple site collections, you can use search query to retrieve the items.

Instead of using the file object from the SharePoint item, we can also use the file url to download the file from the document library. Following code will download the file located at url fileUrl to C:\Docs folder locally on the server:

FileStream fstream = null;
string fileName = Path.GetFileName(fileUrl);
if (!string.IsNullOrEmpty(fileName)) { byte[] data; byte[] buffer = new byte[2048];
WebRequest request = WebRequest.Create(url);
using (WebResponse response = request.GetResponse()) {
using (Stream responseStream = response.GetResponseStream()) {
using (MemoryStream ms = new MemoryStream()) {
int count = 0;
do {
count = responseStream.Read(buffer, 0, buffer.Length);
ms.Write(buffer, 0, count);
} while (count != 0);
data = ms.ToArray();
} } }
string filePath = "C:\Docs";
using (fstream = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite)) {
fstream.Write(data, 0, data.Length);
fstream.Close();
} }

** original post at http://ift.tt/1LD33pT - The SharePoint Guide


by Prashanth Padebettu via Everyone's Blog Posts - SharePoint Community

Infopath - Set Condition to Disable Field

Set%20Condition%20to%20Disable.docx

Set Condition to Disable Field

 If you have a field with choices, (i.e.: Active, Canceled - Current Status of Primary Failed Part#)

and you have another field you want to only display if Canceled is chosen (Cancelation Date).

 

 

 

 

 

 

 

 

 

 

 

1: Create Rule on the cancellation date

 

Click New:

Choose Formatting

2: I named the rule "date"

3: Now click on none

4: If the Current Status of Failed Part {is not equal to} "Canceled"(this is text)

 

 

5: I want to disable the field and backfill with a dark gray

 

 

 

 

 

 

 

 

 

 

 

You can also hide this field

 

 6: Now, Preview your form to check the look and function

 


 

 

 

 

 


by Shannon Martin via Everyone's Blog Posts - SharePoint Community