Get all documents from a Document Set Programmatically

Here is a quick post on how to get all documents from a document set programmatically:

//First getting reference to the list:

SPList myList= web.Lists.TryGetList(“ListName”);

if(myList!=null){

string strquery = “<Where><Eq><FieldRef Name=’Title’/><Value Type=’Text’>”  +           “DocumentSetName” + “</Value></Eq></Where>”;
SPQuery strcamlquery = new SPQuery();
strcamlquery.Query = strquery;
//getting reference to the document set item inside the list
SPListItem docsetitem = myList.GetItems(camlquery)[0];

//Now to loop through items in the document set

SPQuery itemDocSetQuery = new SPQuery();
itemDocSetQuery.Folder = docsetitem.Folder;
SPListItemCollection items = myList.GetItems(itemDocSetQuery);

}

That was a quick post, but I am sure this will be helpful to someone out there.

Launch of spapptex.com

Since the launch of Apptex Add-in for SharePoint, we’ve seen people who were excited to use it, and we received many comments and “reported bugs” in the initial release that we had to work on. Currently, we are in the process of launching a second release with more features “more templates” and bug fixes.

We appreciate the help of the community who were trying this add-in in their projects, and who got back to us with suggestions and compliments, and now.. we’re glad to announce the launch of SPApptex.com which will be the hub for all the modifications and new features we’ll have, plus more add-ins to come 😉

Remember, this add-in is free to use, and dedicated to the community, so feel free to download your copy and try it out.

 

HTTP Service Is Too Busy Error!

An Error you may face is when you try to run a simple SharePoint Management Shell Command, it gives you an error saying :

The HTTP service located at http://localhost:(portNumber)/securitytokenserviceApplication/securitytoken.svc is too busy.

And no commands were working at all.

In this case check the Application Pool for the SecurityTokenServiceApplicationPool, you’ll notice it’s stopped, start it and try again.

Changing RSS Feed links Reference

If you used RSS feeds with SharePoint, and want to make a button where it will display an RSS for specific pages library, you will notice that title in the RSS will open the properties page for the page, not the page itself, so how to change the option?

Go to your “Pages” library, and click library settings in the ribbon, click on RSS settings, you will see a category called “Document options”, change the “Link RSS items directly to their files?” to yes

After changing this option, you’ll see the expected results.

Happy SharePointing

Managed MetaData Service Application Error

When you first install SharePoint and open Central Administration for the first time, you’ll be given two choices, either to run the configuration wizard and let SharePoint do the administrative tasks for you, or configure the farm yourself.

If you configure the farm yourself and decided to add the Managed Metadata Service, you would simply go to Application Management>> Manage Service Applications>> Click new and choose managed metadata service. The SharePoint will create the Service Application for you. So if you try to click on the Managed Metadata Service Application you will be presented with the following error:

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.
To Solve this issue, go to Central Administration >> System Settings Tab>> Manage Services on server>> and notice the managed metadata web service, its not started by default. click start and go back to your service applications page and view your service application. Note you may need to wait fora minute so that the error will disappear and you can use the service application.

How to rename Add new item in lists.

There is a requirement that is requested so much to change the Add new item label in SharePoint lists to something meaningful. The good about these labels is that they have an ID that you can play with using JavaScript. Each of SharePoint lists has ID that is different from a list to another.

For the custom list you have the ID= idHomePageNewItem,  for document libraries it is = idHomePageNewDocument, you can know the exact ID using the IE developer tool or the Firebug in Firefox.

To change the label, use JavaScript, you get the ID of the anchor and change the innerText property. The code is like this:

 

document.getElementById(‘idHomePageNewItem’).innerText= “my new text”;

That’s it.

Configuration Failed – Failed to create sample data

I was trying to install SP Foundation on my Hyper-V machine, and I faced this problem:

createSampleData

After searching and searching online, some people mentioned activating services and trying to run the configuration wizard again, others mentioned navigating to Microsoft Office Servers folder, which doesn’t exist anymore in the RTM release of SP Foundation, but the same principle works for the RTM. All you need to do is to navigate to the following path:

c:Program FilesWindows SharePoint Services15.0Data, and you’ll find an Analytics folder with a GUIC appended to it. All you need is to share this folder.

Hope this helps someone out there as it took a while for me to resolve.

Styling your list views using Apptex

Here is a short video that will show you how you can style your pages using Apptex:

 

Templates available until now:

Tabs: 

tabs

 

Accordions: 

Testimonials: 

 

 

Events: 

 

Slider: 

 

 

Google Maps: 

 

Bing Maps: 

 

Styled Google Maps: 

customgooglemap

 

Quick View: 

quickview

 

 

Modern Tiles: 

ModernTiles

 

 

Pinterest View: 

pinterest

 

Line Chart: 

LineChart

 

 

Bar Chart: 

BarChart

 

Radar Chart: 

RadarChart

 

Polar Area Chart: 

        PolarAreaChart     

 

Now Apptex supports SharePoint on-premise in the new release. Please send us your suggestions for desired templates.

 

The release of Apptex Views SharePoint App

I’m glad to announce the release of Apptex Views for SharePoint, an App dedicated to styling SharePoint 2013 list views to make it so simple for users to apply their favorite designs in no time!

Here is a demo of how it works:

 

 

For more info and questions, don’t hesitate to contact us on our codeplex page: https://apptexviews.codeplex.com/

We’re looking for sponsors to sponsor our App, if you’re interested, feel free to contact us directly on our Emails or through our codeplex page as well.

Happy SharePointing!

 

SP Unique Permissions Script

Hello Community,

I’ve seen many cases where a quick report would be needed to view broken permissions inside a SharePoint site. I even had this case for a customer who wanted to know if users broke some permissions in their own my sites, so I’ve made a script that will be scoped to a web application, and will loop through all site collections in that web application and tell you about any broken permissions for sites, lists or libraries, items or folders, and will give it to you in a .csv file with a nice formatting!  Click here to see how it would look in the .csv file

For more info, please visit: https://spuniquepermissions.codeplex.com/