Tuesday, January 31, 2012

Send email reminder...

A very common requirement is to send emails in SharePoint when List items change / new item is created. One easy way is to create alerts. However, these alerts have their limitations, you cannot define a trigger condition which relates to a specific condition for a column/field to send alerts. OOB alerts are limited to the below:


Alerts in Sharepoint 2010 can be easily configured, but this has its own limitations for tigger based emails.


A simple list for the purposes of example is listed below: You could add a field here which will be the trigger condition and send an email based on that!





The SP designer workflow can be as simple as the below


This will ensure that the email is sent to the user specified and is cleared out once the email is sent. A list of all the users to whom the email was send can be tracked down by the Version history turned on for the List.


Friday, January 13, 2012

Tips and Tricks for Sharepoint 2011

Here are some of my recently used tips and tricks in SP 2010 environment. My plan is to keep this as a working document to keep adding my learnings so that there is one central location for reference! 


  •  If your Custom webpart has a form to input new list items via CAML do not use spList.Update();  This will avoid you the error 0x80070005.
  • Install Visual Studio Service Pack 1 to avoid Initialize control errors while compiling the code which has too many elements in the .ascx files. ( Tip - use shorter Id and class names to compile)
  • A lot of times the requirement is to display Calculated dates, this is easy via calculated columns i.e. 3 months due date
    Calculated date: =DATE(YEAR([Due Date]),MONTH([Due Date])+3,DAY([Due Date]))

  • Display the date in SP designer in a format "mm/dd/yyyy" changes needed in XSLT
    <xsl:value-of select="msxsl:format-date(@Due_x0020_Date, 'MM-dd-yyy')"
  • Just a quick one.
    I was trying to add and deploy a WSP file.Both went well until  I tried adding the webpart and got this error, also when I tried compiling my solution in Visual Studio, the same error resurfaced!
Web Part Error: No available sandboxed code execution server could be found.


well, looks like some service was not working as expected!

Goto SP 2010 Central Admin > App Management > Service Apps > Manage Services on Server. Restart / Start the SharePoint Foundation Sandbox Code Service service instance from services on server. 
  • When you create a new webpart to replace your out of the box new/edit/display form in SP designer - do not delete the Out of box form, close this one. This will avoid you errors in future while display and save of custom designer form.
  • When Making a new Master Page in SP designer, Start with the Starter master pages plenty can be found online, or copy an OOB master page and modify it. Do not remove the aspcontent placeholders, keep them in a hidden div. Deploying master pages via wsp solutions in Visual Studio is a better way but for POC and getting things done quick you can use SP designer. Remember the SPDesigner customizations will have a performance hit since now Sharepoint is not picking it up from the file system ( 14 hive) but from the Database.
  • When creating a URL for your new sharepoint site, avoid spaces to ensure that your link is both shorter and less likely to break when shared via email or instant message.
  • Often you get the long running "Building ther report" message in SP Designer, well not many people know that if you switch the nodes in the left navigation it happens faster.


    Tuesday, January 3, 2012

    Stop and Think.... Its SharePoint Online!

    I have been working on the BPOS D environment for quite some time to list out the major challenges in Sharepoint online world. Our familiar Microsoft SharePoint Server technology delivered as an online service makes the power of the cloud work for any organization. Sharepoint Online lets you create sites to share documents and information with colleagues and customers, and levarage other cool features of Sharepoint 2010. Here's a link that I refer to a lot for Features comparison - Standard vs Enterprise vs Foundation

    Here's a word of caution for the involved partners for choosing Sharepoint in the cloud..
    Sales team - Please stop and think before you suggest a solution and a timeline based on your past projects to your client who is on the CLOUD! Investing in consulting with an expert on the Sharepoint  Online world might not be a bad idea. Very carefully choose your words or frame your contract before you promise a deadline or boast on what Sharepoint can do.

    Project Managers & Delivery Experts- Take help from an expert in the estimation and allocate the right resources, a skill set of Sharepoint novice development team might lead you to a not so happy delivery goal. A hybrid team of Advance Sharepoint Experts and novice learners might be good team ingredients for success.

    Sharepoint Experts & Developers - Invest some time to figure out what is and what is not supported in the online world.  Expand your horizon of knowledge. Share your learning's, this is pretty new and we all need to learn from each other.

    Things that are super easy on a premise deployment of Sharepoint 2010, well... not so much when we are on the cloud!! Welcome to the real world.. !

    Lastly organizations planning on being the technology leaders by having their applications in  Sharepoint on the cloud , evaluate your options before you go for the office 365 / BPOS / Online world when it comes to Sharepoint. Here's a link that might help you to choose.... BPOS D vs BPOS S

    In my next post I am going to talk more about how to work around these limitations so that they are less of a pain by leveraging the cool features of sharepoint to get the things rolling!

    The below should help you make informed decisions in the BPOS D world...

    1.       Third-Party Solutions usage ( i.e. Telerik ): Third-party solutions, or independent software vendor (ISV) solutions, go through the same custom solution review process as described above. The customer is responsible for testing third-party solutions prior to submission to Microsoft. For a list of third-party solutions that work with SharePoint Online Dedicated, see the SharePoint Online Dedicated Custom Solution Developer’s Guide, available from the Microsoft Download Center.

    2.       Use of Sandbox solutions vs CR’s, When a sandboxed solution is deployed, the array of SharePoint functionality available to it is limited to help reduce any security vulnerabilities it may have. Some of these limitations include the following:

    a.       Sandbox solution’s cumulative  resource quota is 300 server resources for the site collection. Solutions can consume resources and may be temporarily disabled if the resource usage exceeds this quota.  Performance (Throughput) - If a sandbox worker process runs for more than 30 seconds, the user code service will terminate the process. If you need to use long-running processes to deliver your functionality, a sandboxed solution is unlikely to be the best choice. However, in these circumstances, you should probably be using an asynchronous execution mechanism instead. For example, use a timer job, a workflow, or a service application to execute your logic as a background task within a farm solution. Executing code within the sandbox environment also incurs a small amount of performance overhead. This is only likely to have a noticeable impact in high volume applications, such as in Internet-facing portal environments. In these cases, you may want to consider deploying your code within a farm solution, More details on the resources can be found here.


    b.      Sandboxed solutions have a restricted subset of deployable solution elements available to them. Potentially vulnerable SharePoint project templates, such as site definitions and workflows, are not available.

    c.       SharePoint runs sandboxed solution code in a process (SPUCWorkerProcess.exe) separate from the main IIS application pool (w3wp.exe) process.

    d.      Mapped folders cannot be added to the project.

    e.      Types in the Microsoft SharePoint Server 2010 assembly Microsoft.Office.Server cannot be used in sandboxed solutions. Also, only types in the Microsoft SharePoint Foundation 2010 assembly Microsoft.SharePoint can be used in sandboxed solutions.

    Unsupported Features of SPO




    1.       Central Admin is not accessible – this brings up a vast list of things that can be done on a prem vs SPO, one e.g. would be - cannot see all the Site collections in a farm, so if you created a site collection and forgot to bookmark or note it down , there is no way to see all the site collections as it is on a Premise deployment.
    2.       Microsoft Project Server
    3.       Microsoft PerformancePoint® Services
    4.       Email integration (email-enabled lists), including Directory Management Services
    5.       Document Conversion Services
    6.       Lotus Notes Connector
    7.       Secure Store Service (for external content types and custom solutions other than the two provisioned accounts)
    8.       Hosted FAST Search  :Note SharePoint Online Dedicated supports integration with on-premises or ISV deployment of FAST Search (see Optional Services later in this document). 
    9.       Searches based on Business Connectivity Services (formerly the Business Data Catalog)
    10.   Tenant administration
    11.   Site Variations
    12.   Search-based alerts
    13.   Microsoft Outlook® Web Access Web Part Integration (My Calendar Web Part)
    14.   Consumption or hosting of service application proxies
    15.   Configuration of IRM settings on document libraries, or integration with an IRM server Note :IRM-protected documents can be uploaded to a document library. 
    16.   WSRP Viewer Web Part (requires SSO)
    17.   SharePoint Online Dedicated does not support the use of the secure store service for authentication to line-of-business (LOB) applications and data sources at this time, except for use with the shared data connectivity account defined for Microsoft Excel® Services and Microsoft Visio® Services, and the shared data connectivity account defined to perform Business Connectivity Services (BCS)-based profile imports.
    18.   SharePoint Online Dedicated does not support any method of single sign-on (SSO) authentication in a situation where a user authenticates to the service, and then the server connects to another system on behalf of the user, impersonating that user. This is true even for a third-party SSO feature.
    19.   SharePoint Online does not support the hosting of custom authentication providers or those developed by third parties. This includes pluggable role and membership providers for Microsoft ASP.NET, forms-based authentication, or Windows Live® ID integration.
    20.   Kerberos token authentication is not supported by SharePoint Online.
    21.   SharePoint Online Dedicated does not support encryption of SharePoint content at rest (stored in SQL Server databases).