Just add this style in a content editor web part in the page you want to hide your left navigation. In case you need to hide it in all the pages, add this to your master page.

<style type=”text/css”>
body #s4-leftpanel { display: none; }
.s4-ca { margin-left: 0px; }
</style>

The style applied to body #s4-leftpanel hides the left navigation & the style applied to .s4-ca removes the empty space & moves the other content of the page towards the left side.

 


Most often you don’t come across this requirement of updating the content approval status column. Below is the scenario I had.

I had a list containing video items.  This has the content approval functionality enabled. On approval this column gets updated to approved. Approved items are displayed in search results. Opening an item displays a media player which plays the video. At this point, I update a column named “Views” in the list, which holds the view count of that video using CSOM. Unfortunately once I update this column, my content approval status became Pending. This makes my search not to crawl the item thereafter.

When i try to update this column to “Approved” in my CSOM code using the content approval column name, SharePoint was  not able to find the column name. So I found 2 things out here..

  • The content approval status column can be accesses using its internal name “_ModerationStatus“.
  • The value which we can assign to it is not Text but Integer. Because the value is defined as an enum internally which is “SPModerationStatusType“.

Below is the code detail and the possible status values & their corresponding enum values.

this.oListItemUpdate = oList.getItemById(listID);

    var wrkFlwApproval = this.oListItem.get_item(‘_ModerationStatus’);
    if(wrkFlwApproval == 0)
    {
        this.oListItemUpdate.set_item(‘_ModerationStatus’, 0 );    
    }

public enum SPModerationStatusType
{
    Approved, //0
    Denied,   //1
    Pending,  //2
    Draft,    //3
    Scheduled //4
 }

Word of caution : The user updating this column should have approver rights on the list.


Below link provides you the complete configurations & details that you need to develop and deploy an app in a SharePoint hosted mode.

How to: Set up an on-premises development environment for apps for SharePoint


When you try creating a SharePoint 2013 App project in a SharePoint hosted model and when you try to deploy the solution, you get an error “Error occurred in deployment step ‘Install app for SharePoint’: Sideloading of apps is not enabled on this site.”

One thing you should remember is, Always the app should be published/deployed to the developer site. That is, while creating a site collection/site where you want to deploy the app, create it using the “Developer Site” template under the Collaboration tab. Now you will be able to deploy your app on the site.

2012 in review

Posted: January 1, 2013 in Uncategorized

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

19,000 people fit into the new Barclays Center to see Jay-Z perform. This blog was viewed about 77,000 times in 2012. If it were a concert at the Barclays Center, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.