17 February, 2013

How to hide "Respond to this Survey"



Survey Purpose:
We use surveys to ask team members what they think about issues, how to improve your processes, and many other topics. You can collect the results by using several different types of questions, such as multiple choice, fill-in fields, and even ratings.

Problem Description:
How to hide "Respond to this Survey" when a user has already responded to the Survey

It’s simple but little bit tricky to implement as it involves user controls also.

Imp point to note:
·         The Rendering Template for the Survey List is in the defaulttemplates.ascx
Control under 12/Template/Control template.

·         The rendering template ID is ‘ViewToolBar. This template renders the "Respond
to this Survey", Actions menu and Settings menu in the toolbar.

·         This template is a generic template which is used by other lists as well.

·         "Respond to this Survey" is rendered by <SharePoint:NewMenu
AccessKey="<%$Resources:wss,tb_NewMenu_AK%>" runat="server" />.

How exactly it looks like:
<SharePoint:RenderingTemplate ID="ViewToolBar" runat="server">
<Template>
<wssuc:ToolBar CssClass="ms-menutoolbar" EnableViewState="false" id="toolBarTbl"
ButtonSeparator="<img src='/_layouts/images/blank.gif' alt=''>"
RightButtonSeparator="&nbsp;&nbsp;" runat="server">
<Template_Buttons>
<SharePoint:NewMenu
AccessKey="<%$Resources:wss,tb_NewMenu_AK%>" runat="server" />
<SharePoint:ActionsMenu
AccessKey="<%$Resources:wss,tb_ActionsMenu_AK%>" runat="server" />
<SharePoint:SettingsMenu
AccessKey="<%$Resources:wss,tb_SettingsMenu_AK%>" runat="server" />
</Template_Buttons>
<Template_RightButtons>
<SharePoint:PagingButton runat="server"/>
<SharePoint:ListViewSelector runat="server"/>
</Template_RightButtons>
</wssuc:ToolBar>
</Template>
</SharePoint:RenderingTemplate>

Microsoft Recommendation:
1.    We cannot modify OOB defaulttemplates.ascx as this would be unsupported
2.    Make a copy of defaulttemplates.ascx under CONTROL TEMPLATES FOLDER of 12 hive
and rename it to CustomDefaultTemplates.ascx
What exactly needs to done/Resolution:
1.    To hide “Respond to this Survey” if a user has already responded to the survey,
Create a class which inherits from the Microsoft.Sharepoint.WebControls.NewMenu.

2.    In this override CreateChildControls and have your logic to hide unhide "Respond
to this Survey" based on your need.

3.    Build the class library and install the dll to the GAC.

4.    Modify the “ViewToolBar” in the custom ascx such that to render your custom
"Respond to this Survey" menu from the class library you created.

(Note: You need to add your assembly reference and register the tag prefix in the
Custom ascx control.)

5.    Next step is to render the custom rendering template to the "Survey List" so
     that the custom "Respond to this Survey" menu will be rendered in the toolbar.

6.    For this the "ToolbarTemplate" property of the View should be changed in the
schema.xml file of the Survey List definition.

7.    As modifying the OOB files are not supported, Copy the “SurveyList” folder from
12/Template/Features and paste in the same place as “CustomSurveysList”.
Change the feature ID of the “CustomSurveyList”

8.    Open the schema.xml file available under survey folder of “CustomSurveysList”
and add the “ToolbarTemplate=CustomViewToolBar” attribute to the “View BaseID=0”.

Example attached:
<View BaseViewID="0" FreeForm="TRUE" ReadOnly="TRUE" Type="HTML" ToolBarTemplate=" CustomViewToolBar ">

9.    Install and activate "CustomSurveysList"

10. Create a Survey List using CustomSurveyList template and we should be able to
achieve the functionality as required.

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

14 February, 2013

Downloadable evaluation resources for SharePoint 2013

Download the following content for information about how to evaluate SharePoint 2013.

Content Description
Downloads IT Professional Reviewer's Guide for SharePoint Server 2013 Preview Learn how new capabilities in SharePoint Server 2013 can help IT pros better manage cost, risk, and time.
Downloads Download SharePoint Server 2013 Preview See for yourself what SharePoint 2013 can do by downloading and installing this version.
Downloads Download SharePoint Foundation 2013 Preview See for yourself what SharePoint 2013 can do by downloading and installing this version.
Lab icon Test lab guides Get up and running quickly in a test environment by following these guides that take the guesswork out of a SharePoint 2013 deployment.
Building blocks SharePoint 2013 training for IT pros IT pro-focused how-to training and covers changes and new features for search, social, plus deployment and performance/scalability with downloadable presentations.

SharePoint 2013 Certifications



As of today, we have a total of 4 training courses available. These are:
FIrst Look Clinic: What’s new for IT Professionals in Microsoft SharePoint 2013 – it’s a 3 hour clinic, rather than a traditional training. I’d argue this is almost full day training, since it took more than 3 hours just to skim through. Since it’s a very early look at SharePoint 2013 there’s not certification alignment for this clinic.

The second one is First Look Clinic: What’s new for Developers in SharePoint 2013 and it’s also a 3 hour clinic. More like a day, although there are no labs available within the course material.
The third one is SharePoint 2013: IT Pro Ignite training. It’s a 3 to 5 day classroom-based training, including hands-on labs. It’s not widely available but does give you a deeper look and knowledge into what’s possible with SharePoint 2013 for IT Pros. As you might have guessed, the fourth course that is available is SharePoint 2013: Developer Ignite training. Also 3-5 days, lots of labs.
Finally, the Programming in HTML5 with JavaScript and CSS3 course was released for public use. A book is coming out in April from MS Press – see details here.

The first exam for anyone wanting to be fluent with developing solutions for SharePoint 2013 is Programming HTML5 with JavaScript and CSS3 (70-480). This exam was released August 20th, 2012. The accompanying preparation material is available (see here). This is a mandatory certification exam for the upcoming MCSD: SharePoint certification.

The second exam we already have details on, is for IT Pros: Core Solutions for SharePoint Server 2013 (70-331). Availability for this exam was scheduled for February 5th, 2013 and as of February 2nd, the certification exam was available from Prometric. 

The third exam is also for IT Pros called Advanced Solutions of Microsoft SharePoint Server 2013. It’s also available since February 2nd, 2013. Together with 70-331 and 70-332 you are two steps closer to being an MCSE: SharePoint.

The last requirement for MCSE: SharePoint (for IT Pros) is MCSA: Windows Server 2012. You can either complete this requirement with a single upgrade exam (70-417) or do all three certification exams: 70-410, 70-411 and 70-412.

13 February, 2013

In Windows PowerShell 2.0 (the November 2007 Community Technology Preview release) the PowerShell team has taken an interesting approach to script debugging. As you know, PowerShell doesn’t require a specialized script editor or development environment. Instead, PowerShell users can, and do, use any and all text editors (from Notepad on up) to write their scripts. Because of that, the PowerShell team decided to build their debugging tools into Windows PowerShell itself; in turn, that means that you can use the new debugging cmdlets to debug any script from the console window itself.

Failed to open a connection to the Nintex Workflow configuration database


Here we go with another new issue and easy resolutions & workarounds…
This time, the issue was with Nintex workflows at the time of activating a site collection feature. Let me describe the details in step by step so that it will be easy recognize as well as understand…

Problem Description:
Problem activating Site Feature. While activating the ‘Nintex workflow 2010’ at the site collection level, we faced the following error message:

Error Message:
An unexpected error has occurred.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: XXXXX

Troubleshooting Steps:
1)    Most imp regarding any exceptions: SharePoint logs (\14\logs)-specifically if we face “unexpected error”
2)    Windows event logs
3)    If we have a correlation id then it’s very easy to find out the exact error message

After reviewing the SP logs, this is what I found:
Exception was thrown while ensuring dependencies met for feature 'NintexWorkflow' (id: 0561d315-d5db-4736-929e-26da142812c5): Nintex.Workflow.NWFeatureActivatingException: Nintex.Workflow.NW2007DatabaseConnectionException: Failed to open a connection to the Nintex Workflow configuration database. ---> System.Data.SqlClient.SqlException: Cannot open database "NW2007WFDB" requested by the login. The login failed.  Login failed for user 'Contoso\Administrator'. 

What we need to target first in such conditions:
1.    What exactly the app pool identity is used by that web application? Does it have sufficient rights/not?
2.    The Nintex database has a role called WSS_Content_Application_Pools. This is the group that we need to add the app pool identity to
·         SQL SERVER
·         SharePoint_Config
·         Security
·         Users
·         The account which is running the app pool of the web application
·         Right Click-Properties
·         General
·         Database role membership

Resolution:
I have added this group named as WSS_Content_Application_Pools to the APP POOL identity and that it. It worked and issue has been successfully resolved…

If you have any queries/questions regarding the above mentioned information then please let me know.

I would be more than happy to help you as well as resolves your issues…

Thank you.