Creating a custom activity for a sandboxed solution
Even with the limited capabilities of sandboxed solutions, you can still develop custom activities that can be used in SharePoint designer without making changes to web.config
or adding the .ACTIONS
file to the root folder.
In this recipe, we will create a custom activity that can be deployed in a sandboxed environment. This activity will create an event in the calendar for a given date.
Getting ready
The concepts of custom activities need to be understood before following this recipe. Hence you should have completed the previous recipe successfully.
How to do it...
Create an empty SharePoint project called SandboxedActivity and make sure to select deploy as a sandboxed solution.
Add a class file and name it SandboxActivity. Also make sure to change the access modifier to public.
Add the following code
using
statements to the class:using System.Collections; using Microsoft.SharePoint; using Microsoft.SharePoint.UserCode; using Microsoft.SharePoint...