If somebody like the post and its helpful in your work then, add comments.

Thursday, July 21, 2011

SharePoint 2010 : Import List workflow in your custom solution

When you have to import the workflow in your solution, like for Sandbox solution. So, how you will be importing that list workflow in the VS 2010 sandbox solution. Many of us find like import reusable workflow in the VS 2010 solution. But what about the list workflows. And suppose if their is more then one workflow. I have also search lot on this topic and does not get not much help.

Solution Smile!!!!!!!!!!!!!!

To import List workflow on the VS solution. Create a WSP of the Site and import using the VS template  for SharePoint. Now Copy the ListInstances(On which list workflow are created),Modules of the workflow and WorkflowAssociations folders in our custom solution. Now build the solution. It will give some errors of workflow. So over come the errors add reference of following references

  • microsoft.sharepoint.WorkflowActions
  • System.Workflow.Activities
  • System.Workflow.Runtime

It will resolve the some of the errors. Now it will be giving the XOML errors. So to overcome these errors,you have add the same line of the tag from “importsolution.csproj” file to “customsolution.csproj”. Make it similar as import solution.

The changes should be done for workflow.xoml, workflow.xoml.wfconfig.xml and workflow.xoml.rules for all the workflow which are associated with all the list in the WSP. Now all the error will resolved. Deploy the solution and test. The workflow will work fine.

It will help in creation and deployment for the sandbox and SPD workflow. Comment if any help needed.

SharePoint 2010 : Creating a Web/Site template

What Are Web Templates in general?
We can a web site template is a pre-designed web page or simply a web page without or with basic contents. Right?

What is web template in the SharePoint term?
Web templates on the other hand, are stored in the database, and are created using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.

In SharePoint 2007/2010 the meaning is same for both the version. But creating a web template is now different in the both version, means approach is different.
Like in MOSS we can create the web template using the existing site, SPD 2007 for UI and WSP for deployment. But in the SharePoint now you can create your Custom Web template using the SharePoint existing site. Well, for the custom template first you have to design and implement all the requirement on the existing site, and save the template in the Site templates. But here is the slightly change, we can create two types of the site template solution,
In VS 2010 their is a new template for the creating the solution from existing WSP is Import SharePoint Solution Package.

Import SharePoint Solution Package

Now you can import your WSP in this solution and you can write your custom code or now you can modify UI etc. It will give great help when you are creating a sandbox solution and does not want to write a code. then just deploy all the solution on existing site and use that site WSP to import in this solution. Extract your required solution from it and implement in the your solution.

Wednesday, July 20, 2011

SharePoint 2010: Challenges in the Sandbox

Well, Challenges :),

In sandbox if we have to create like simple custom branding (Master Page, CSS etc.) then first it seems like very simple task for the developers. But, is it simple....well in some respect yes like we can create a solution in the Visual Studio 2010,check to deploy it as sandbox but when we have deploy the solution and activate on the site collection it is very tough job to make. Sometime the service behavior weird, or sometimes it is gone off etc. And on Office 365 it is also new monster for developer to deploy the solution. And it has lesser privileges, options. Like an event receiver on the sandbox, we can create an event receiver in VS 2010 and now we have to attach it with specific list, but the way is different. It can be performed using the configuration XML. But is it does the required work, when I have tried that it is unable to attach with list, even in the debugger :).

So, in Sandbox solution, many sectors want to migrate their farm solution (Fully trusted solution) in the sandbox solution, to reduce the cost of IT, maintenance etc. But I think on that part they have to compromise on the many of the expectation.

Well sandbox decision is quiet tricky one, just creating a static or less functional site it will good for small scale companies but for fully functional rich facility we have to use other option.