Sunday, November 23, 2014

Change color of Suite Bar in SharePoint Office 365

It took me a while to know that the top nav bar in Office 365 is called Suite Bar. The next thing I needed to know is how to change the color because the customer I am working for these days wants their branded color to be applied across the site collections. There are couple of ways to get the job done but lets stick to the most simplest one.

If you notice my suite bar color is not the default one and I have already changed it. To get the job done you need to be Administrator to perform the following actions.

1. Click Admin and then click Office 365



2. Once you are on your portal site click the name of your company on the top right corner of the page.

3. You will land on Company profile page. Click on Custom theming and change Accent color to change Suite bar color.  (Note: It will take some time to get your changes applied across sites implies all the sites are using default theme.

Monday, November 3, 2014

Creating Views based on Dates

I wanted to create a View on my custom list in SharePoint Online showing me data for last 7 days.
I initially though that it will be as simple as selecting my Date column and selecting options like "is greater than" or "is less than" but to my amaze it does not work like this.

Simply put if you want to create views based on days (Last 7 days, Last 30 days) following is how you do it 


Wednesday, October 8, 2014

Creating views using workflow status column in SharePoint 2010

It took me by surprise when I created a view on my list based on workflow status that it does not work. I wanted to create a "In Progress" view for my list which had workflows running on it. After some searching I came to know that what you see is NOT what you get.

We all know that a workflow can be in my states. Following is the list of common workflow states and what unique number SharePoint 2010 assigns them.

Workflow Status SharePoint Id
Not Started 0
Failed On Start 1
In Progress 2
Error Occurred 3
Stopped by User 4
Completed 5
Cancelled 15
Approved 16
Rejected 17

Here is how you create a view on SharePoint 2010 on a list with workflows

1. Choose a list (it also works the same on document library but I have using list to demonstrate it) on which you want to create views and select List Settings using List tab from your ribbon





2. Scroll down until you see Create View link under Views section

3. Select your format

3. On Create View screen, name this view and scroll down to Filter section and select your Workflow name from "Show the items when column" drop down.

4. Select "is equal to"

5. Put a number in the text field depending on what view you are creating. Pick a number from table given above to create a particular view.

6. Click OK.

7. You can view all your views.




Happy viewing

Monday, September 29, 2014

Remove and Add Title column from Content Types in SharePoint 2010

I was working on content types today and realized that SharePoint 2010 is forcing me to use Title Column which I didn't require. I wanted to remove this column but unlike other columns I added, I could not see Remove button.

Custom Column in Content Type with Remove Button
 Content Type Title Column without Remove Button
I googled for it and got to a post (just like you did) to be able to remove Title Column.

Steps to perform
1. Open SharePoint 2010 Management Shell by click Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell right click and Run as Administrator
2. Run the following script
$web = Geb-SPWeb http://YOURPORTAL
$ct = $web.ContentTypes["YOUR CONTENT TYPE"] 
$spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["Title"])
$ct.FieldLinks.Delete($spFieldLink.Id)
$ct.Update()
$web.Dispose()

Note: Always test the script on Staging / Test environment before running it on your Production environment.
You also need to understand that removing this column will not remove it from any of the lists/libraries that are using this column.

A little later I realized that I wanted this column back so I ran the following to get it back.

$web = Geb-SPWeb http://YOURPORTAL
$ct = $web.ContentTypes["YOUR CONTENT TYPE"] 
$spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["Title"])
$ct.FieldLinks.Add($spFieldLink)
$ct.Update()
$web.Dispose()


Thank you Phil Childs for pointing me to right direction