All of the available out-of-the-box content types and their related columns in SharePoint Server 2013 are listed here in a post @JKevinParker http://www.jkevinparker.com/2014/02/sharepoint-2013-content-types-and.html

You can also find the xml for most of the built in content types at your SharePoint server under the 15 hive folder TEMPLATE\FEATURES\ctypes\

 

Here is the PowerShell to fetch all content types on a web

$site = Get-SPSite http://SharePointSite

$web = $site.RootWeb

foreach ($ctype in $web.ContentTypes) {$ctype.Name}

 

Go here for SharePoint Online content types in Powershell http://social.technet.microsoft.com/wiki/contents/articles/31151.sharepoint-online-content-types-in-powershell-get.aspx

Content Type IDs

Content type IDs uniquely identify the content type and are designed to be recursive. Read more here about the way to construct a valid content type ID: https://msdn.microsoft.com/en-us/library/office/aa543822%28v=office.14%29.aspx

Tags: , | Categories: SharePoint Development | Tips and tricks

Ran in to a project today where I had to revisit the old LDAP query.

ADUC Advanced Custom Search Results

Here are some useful links:

LDAP Query Basics

https://technet.microsoft.com/en-us/library/aa996205%28EXCHG.65%29.aspx

· Doing a Search Using Active Directory Users and Computers

Search Filter Syntax
http://msdn2.microsoft.com/en-us/library/aa746475.aspx

Famous LDAP Filters for Active Directory Environments

http://www.ldapexplorer.com/en/manual/109050000-famous-filters.htm

How to search and find user accounts in Active Directory

http://www.selfadsi.org/extended-ad/search-user-accounts.htm

Using Ldp.exe to Find Data in the Active Directory

https://support.microsoft.com/en-us/kb/224543

How to Create Custom Active Directory LDAP Searches

http://blogs.msdn.com/b/muaddib/archive/2011/10/24/active-directory-ldap-searches.aspx

 

More…

How Can I Get a List of All the Users Whose Passwords Never Expire with PowerShell?

http://blogs.technet.com/b/heyscriptingguy/archive/2005/08/29/how-can-i-get-a-list-of-all-the-users-whose-passwords-never-expire.aspx

LDAP/AD Claims Provider For SharePoint 2013

http://ldapcp.codeplex.com/

Tags: | Categories: Database | Tips and tricks

Todd Klindt has made a very useful SumUp on how to create different SharePoint Admin Permissions.

For more information, take a look at Todds post Demystifying SharePoint Admin Permissions at Todd Klindt's SharePoint Admin Blog

Web Application Policy

How Do You Give It?

In Central Admin > Manage Web Applications > Policy for Users

Farm Administrators in Central Admin

How do you give it?

In Central Admin > Security > Farm Administrators

SPShellAdmin

How do you give it?

From PowerShell with the Add-SPShellAdmin cmdlet.

Service App Administrator

How do you give it?

Central Admin > Service Application Management. Highlight the service application and click “Administrators" in the ribbon. Add the user to the Administrators list.

Tags: , , | Categories: Tips and tricks | SharePoint Configuration

Trying to filter a list on its workflow status is pretty non-intuitive. You need the special status codes. Theese will work with all workflows in ShaePoint even Nintex workflows.

Status Code

Status Description

0

Not Started

1

Failed on Start

2

In Progress

3

Error Occurred

4

Cancelled (i.e. Stopped by User)

5

Completed

6

Failed on Start (retrying)

7

Error Occurred (retrying)

8

(unknown)

9

(unknown)

10

(unknown)

11

(unknown)

12

(unknown)

13

(unknown)

14

(unknown)

15

Cancelled

16

Approved

17

Rejected

Theese status codes can be used in editing list view query in both the user interface and the CAML in the list schema.xml

image005

 

image006

Another little special SharePoint speciality is that the workflow status field is referenced as the 8 first letters in the workflow instance name and the value type as WorkflowStatus

References:

Tags: , , , , , | Categories: Tips and tricks | SharePoint Development | SharePoint Configuration

QuerySting paramerters in the URL can help you edit pages where the edit button is missing (ex. SharePoint 2007 list views) or you need to throw away a web part that’s messing with your page from the web part maintenance view.

Function URL
Add Web Parts/Browse ToolPaneView=2
Add Web Parts/Search ToolPaneView=3
Edit Mode mode=edit
View mode mode=view
Shared view PageView=Shared
Personal view PageView=Personal
Maintenance view contents=1

You can combine some of the urls ex Edit personal view: …aspx?PageView=Personal&mode=edit

Tags: , , , | Categories: Tips and tricks | SharePoint Configuration

Problems with disabled accounts from former employees in your SharePoint User Profile Store ?

This will help you set up Exclusion Filters in the User Profile Synchronization

 

1) Browse to Central Administration Site > Manage Service Applications > User Profile Service Application.

2) On the Manage Profile Service: User Profile Service Application page, click the  Configure Synchronization Connections. This will take you to a page where all the synchronization connections are.

follow this excellent post from Spencer Harbar at harbar.net (http://www.harbar.net/archive/2011/02/22/323.aspx)

He explains how to set up filters with the userAccountControl attribute from AD user object.

  

Tags: , , | Categories: Tips and tricks | SharePoint Configuration | SharePoint related

In SharePoint you can only view alerts per site. That means you cannot see all your alerts at once.

View my alerts on a site

At the top of the site, click User name , and then click My Settings, click My Alerts.

View alerts for other people on a site

As a Site Administrator you can view alerts of other users on your site through Site Actions -> Site Settings -> Under Site Administration -> User Alerts select the person whose alerts you want to view and select Update.

View all my alerts

There are several solutions for this, CodePlex and other SharePoint companies have some.
Outlook to the rescue! If you are using Exchange your Exchange mailbox will keep track of all your alerts and where these are subscribed from.
Choose Rules and Alerts.. select the Manage Alerts tab.

blog-manage-all-alerts - small

Tags: , , , | Categories: SharePoint Configuration | Tips and tricks

Recently found this excellent post explaining the SharePoint UserProfile picture sizes and naming convention.

 

Naming convention for the thumbnail files:

Thumbnail Image File Name Size
Large domain_username_LThumb.jpg 144x144
Medium domain_username_MThumb.jpg 96x96
Small domain_username_SThumb.jpg 32x32

The full URL of the medium thumbnail (like, “ http:///User Photos/Profile Pictures/__MThumb.jpg”) is stored in the user profile database.

You can use this information like:

var picUrl = profile[PropertyConstants.PictureUrl].Value as string;
this.imgUser.ImageUrl = picUrl.Replace("_MThumb", "_LThumb"); 

 

 read the full post Photo Management in SharePoint 2010 

 

Tags: , | Categories: SharePoint Development | Tips and tricks

Using the in the the wrong parameter with the SPWeb.GetList method you will receive a FileNotFoundException with the following very SharePoint-ish error message:

System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr>
<nativestack></nativestack><nativehr>0x80070002</nativehr>
<nativestack></nativestack>

The stacktrace will often give more information but the ULS log it wil simply show:

<nativehr>0x80070002</nativehr>
<nativestack></nativestack>

So the parameter is incorrect; Either the URL does not specify a valid path to the website, or the list does not exist in the website.

The GetList method gets the list that is associated with the specified server-relative URL to the root folder of a list, such as /sites/sitecollection/subsite/Lists/Announcements.

HINT

You can use the SPUrlUtility.CombineUrl with your webs server relative URL like this:

var list = web.GetList(SPUrlUtility.CombineUrl(web.ServerRelativeUrl, 
"lists/" + listFolderName));

I prefer to use the SPWeb.GetList over the SPWeb.Lists Property. Endusers can easy change the list title in the GUI but it is harder to change its URL.

Be aware; there are other methods casting System.IO.FileNotFoundException!

Tags: , , , | Categories: SharePoint Development | Tips and tricks

When compiling a project in Visual Studio, I got the error message

"the exec task needs a command to execute"

, with no line number or anything.

Solution

Check the "build Events" in the project properties.
The error is caused by a newline character in the pre or post build text fields.

This applies to Visual Studio 2005, 2008 and 2010!

Tags: | Categories: IDE | Tips and tricks | Web development