Jeroen Derde's Blog

My Software Engineering Universe

SharePoint 2010 Workflow

clock February 25, 2010 20:24 by author Jeroen Derde

   

A collegue created a SP2010 workflow in visio, and imported it into SharePoint Designer 2010.
His flow used the following actions: 

  • AddListItemPermission
  • InheritListItemPermissions
  • RemoveListitemPermission
  • ReplaceListItemPermissions

SharePoint Designer 2010 throws an error when he validates the workflow (check for errors) or tried to deploy it.

The error (for searchablility):
This workflow action is not supported in this region of the workflow.
It can only be inserted in certain types of blocks.

 

SharePoint Designer does not show the actions as available.
After a bit of searching we found that these actions can only be added when inserted in an Impersonation Step.
This is logical as the impersonation step runs as the author of the document, in stead of the workflow starter.

Hope this is helpful.

 



Anti spam

clock February 25, 2010 20:22 by author Jeroen Derde

Implemented AkismetExtension on the blog a week ago, and it seems to be working.

Lets hope it lasts.



Known SP2010 issues

clock February 12, 2010 19:12 by author Jeroen Derde

Alexander Ketelaar (www.sharepoint2010.nl) found the following list of known SP2010 beta 2 issues.

http://officebeta.microsoft.com/en-us/sharepoint-server-help/microsoft-office-servers-beta-2-known-issuesreadme-HA101267292.aspx?CTT=1

 



SP2010 Site and Web Feature Id's

clock December 16, 2009 01:48 by author Jeroen Derde

Thanks to Jeffrey Tummers for retrieving the id's


<SiteFeatures>
  <!-- Content Type Syndication Hub -->
  <Feature ID="9a447926-5937-44cb-857a-d3829301c73b" />
  <!-- Document ID Service -->
  <Feature ID="b50e3104-6812-424f-a011-cc90e6327318" />
  <!-- Document Sets -->
  <Feature ID="3bae86a2-776d-499d-9db8-fa4cdc7884f8" />
  <!-- SharePoint Server Enterprise Site Collection features -->
  <Feature ID="8581a8a7-cf16-4770-ac54-260265ddb0b2" />
  <!-- SharePoint Server Standard Site Collection features -->
  <Feature ID="b21b090c-c796-4b0f-ac0f-7ef1659c20ae" />
  <!-- Workflows -->
  <Feature ID="0af5989a-3aea-4519-8ab0-85d91abe39ff" />
</SiteFeatures>
<WebFeatures>
  <!-- Metadata Navigation and Filtering -->
  <Feature ID="7201d6a4-a5d3-49a1-8c19-19c4bac6e668" />
  <!--SharePoint Server Enterprise Site features-->
  <Feature ID="0806d127-06e6-447a-980e-2e90b03101b8" />
  <!--SharePoint Server Standard Site features-->
  <Feature ID="99fe402e-89a0-45aa-9163-85342e865dc8" />
</WebFeatures>



View Content Types

clock November 25, 2009 02:32 by author Jeroen Derde

This tool makes contenttype development a lot easier.

Click the contenttype together in MOSS and copy the xml from this tool into your sharepoint solution.

This tool works with SP2010 beta.

http://www.codeplex.com/MOSS2K7CTypesViewer

 



Don't set your SharePoint trustlevel to full

clock November 10, 2009 00:29 by author Jeroen Derde

A really nice (and funny) article why you should not do this, by Tyler Holmes.

http://blog.tylerholmes.com/2008/10/don-set-your-sharepoint-app-to-full.html

I came across this article because we had an assembly containing a feature reciever that would cause an error when executed.
Assemblies containing feature recievers should always go in the GAC (by design), but we where creating a custom policy.

So, I agree with Tyler that custum policies are still preferable, but when you have a dll that contains a feature reciever, you should just put it in the GAC.



.Net University

clock October 9, 2009 21:52 by author Jeroen Derde

 

Free download of Powerpoint slides, demos, video's and example code of around 40 .net courses.

http://dotnet-u.com/Courses.aspx

Enjoy.

 



LINQtoSQL cheatsheet

clock August 21, 2009 22:56 by author Jeroen Derde

 

 

 

 

 

DamienG, just posted a LINQ to SQL cheatsheet for C# and VB.net.

Download it at: http://damieng.com/blog/2009/08/12/linq-to-sql-cheat-sheet

 



REST for asp.net MVC SDK

clock August 18, 2009 19:45 by author Jeroen Derde

 

 

 

 

 

 

Phil Haack just posted about REST and ASP.NET MVC.
He explains why the WCF team at Microsoft has put together an SDK and samples for building REST services using ASP.NET MVC.

The post can be found at: http://haacked.com/archive/2009/08/17/rest-for-mvc.aspx

I'll be giving this SDK a go, and keep you updated on my findings.

You might also want to take a look at this article about building a WCF REST client: http://damianm.com/tech/building-a-rest-client-with-wcf/

 



iShare Sharepoint on your iPhone

clock August 4, 2009 22:03 by author Jeroen Derde

 

 

 

 

Today I came across a iPhone app that enables you to browse SharePoint from your iPhone.
Haven't tried it myself because I use a windows mobile phone, but might be usefull for all you out there.

http://www.spyk.com/Products/iShare/Pages/iShare.aspx

Just thought I'd share...

 



MOSS lockdown mode

clock July 31, 2009 19:41 by author Jeroen Derde

 

 

 

Lockdown mode is a feature that you can use to secure published sites. When lockdown mode is turned on, fine-grain permissions for the limited access permission level are reduced. The following table details the default permissions of the limited access permission level and the reduced permissions when lockdown mode is turned on.

  

 

Permission Default Lockdown

List permissions: View Application Pages

x  

Site permissions: Browse User Information

x x

Site permissions: Use Remote Interfaces

x  

Site permissions: Use Client Integration Features

x x

Site permissions: Open

x x

 

 

 

 

 

 

 

 

 

Enable lockdown

stsadm -o activatefeature -url <site collection url> -filename ViewFormPagesLockDown\feature.xml

Disable lockdown

stsadm -o deactivatefeature -url <site collection url> -filename ViewFormPagesLockDown\feature.xml



3th Party SharePoint Tools

clock July 30, 2009 20:50 by author Jeroen Derde

A little more than a year ago Bill English wrote a post about 3th party MOSS tools that I just came across.
It's an old post, but still a nice read if you are interested in adding functionality to your MOSS deployment in one of the following categories:

  1. Collaboration
  2. Security, User Account Management and Permissions Management
  3. Search and Relevance
  4. Workflows
  5. Document Administration
  6. Upgrade and Moving Content

The post can be found here: http://admincompanion.mindsharp.com/BillBlog/Lists/Posts/Post.aspx?ID=75



PDFtoWord

clock July 24, 2009 00:33 by author Jeroen Derde

 

Today I got a PDF document from a client that I needed to fill out and hand back in digitally. The PDF did not feature any inputboxes so editting the PDF was not an option. I found myself pondering the remaining options:

  1. Print --> Fill out --> Scan --> Hand in.
    I didn't really like the first option, I'm in IT....I dont write stuff .
  2. Retype the entire document and fill it out digitally, and hand it back in.
    I'm in IT, i don't retype stuff.
  3. Convert the PDF back to word.

So that only left me with option 3, converting the pdf to word.
There are many word to pdf converters out there, but I never really looked for something that does the opposite.

A small Bing resulted in www.pdftoword.com

After uploading the PDF and entering my email address, I got an e-mail in no more than a minute containing my PDF as a Word document.
I was dumbstruck by the quality of the conversion of the form, so I uploaded another 77 page PDF and had that converted aswell.
Even this large document with lots of tables was converted perfectly.....well almost....

  1. Footer and Header recognition: footers and headers are not recognized, and are just text on each page. It would be really nice if these could be recognized and put into the word document as a footer or a header.
  2. Heading and TOC recognition: It would be nice if headings (chapters and paragraphs) could be recognized by PDFtoWord. Then they could also create a TOC instead of just text.

Hope someone finds this service usefull to.

 



WittyTwitter TwitterLib

clock July 14, 2009 23:34 by author Jeroen Derde

 

Found this .Net wrapper for the Twitter API called TwitterLib. It's part of WittyTwitter, but can also be used on it's own.

Code can be found here. http://wittytwitter.googlecode.com/svn/trunk/Witty/TwitterLib/
Nice if you are planning on building a twitter enabled app.

 

 

 



ComplexModelBinder

clock July 10, 2009 01:29 by author Jeroen Derde

Today I was experiencing a problem in the MVC application I am currently developing.

First some information:

Model: ContactDataModel
ContactDataModel implements interface IContactData. This is because the related typedview Step1 contains a partialView that inherits IContactData.
this way we can reuse the partial view simply by having each model, that needs to use the partialview, implement this interface.

 

Interface IContactData


public interface IContactData
{
    ContactData Contact { get; set; }
}

 

Object ContactData


public class ContactData
{
    [Required]
    [StringLength(200)]
    public string Voornaam { get; set; }
}

 

View: Step1
This view inherits from ContactDataModel


...
<h2>ContactGegevens</h2>  
<% Html.RenderPartial("ContactDataUserControl"); %>
...

 

Partial View: ContactDataUserControl
This view inherits from IContactData


<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QNH.Interfaces.IContactData>" %>
<%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm()) {%>
<fieldset>
    <legend>Fields</legend>
    <p>
        <label for="Contact.Voornaam">
            Voornaam:</label>
        <%= Html.TextBox("Contact.Voornaam")%>
        <%= Html.ValidationMessage("Contact.Voornaam", "*")%>
    </p>
.........more fields....form closed

 

Controller: MyController


[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Step1( ContactDataModel contact )
{
    ....
}

 

The "POST" method "Step1" on MyController was recieving an empty ContactDataModel object. If I changed the the Step1 method to recieve the FormCollection instead of the Model object then my values would be present. After this I thought: what object is responsible for mapping the formvalues in my view to my model object. The answer is: the ComplexModelBinder.

The main thing to remember when using the ComplexModelBinder is the naming convention of your controls in the form. Because it uses reflection the ComplexModelBinder is expecting the Class Name + “.“ to be appended to the property name. If you are using the ComplexModelBinder and not prefixing the Class Name to the name of the Property, you will just get null values for your properties.

This means that in my partial view were I was using Contact.Voornaam I needed to use ContactData.Voornaam.This also means that I needed to change the name of the property in my interface to ContactData, because else it would not be recognised.

New Interface: IContactData:


public interface IContactData
{
    ContactData ContactData { get; set; }
}

New Partial View: ContactDataUserControl
This view inherits from IContactData


<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QNH.Interfaces.IContactData>" %>
<%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm()) {%>
<fieldset>
    <legend>Fields</legend>
    <p>
        <label for="ContactData.Voornaam">
            Voornaam:</label>
        <%= Html.TextBox("ContactData.Voornaam")%>
        <%= Html.ValidationMessage("ContactData.Voornaam", "*")%>
    </p>
.........more fields...form closed
 

 

I really hope this helps out someone else. Happy Coding.

 




Month List

Calendar

<<  December 2017  >>
MoTuWeThFrSaSu
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Sign in