0

I've created a custom workflow action using the VS2010 for SharePoint 2010 online. But whenever I use the custom action within a workflow and attach it to a list, it never runs successfully. While debuging, I always get the following error: "Function evaluation disabled because a previous function evaluation timed out. You must continue execution to re-enable function evaluation." in the following code snippet:

SPSite oSite=new SPSite(context.CurrentWebUrl);

where context is the 'SPUserCodeWorkflowContext'. 'context.CurrentWebUrl' always return the current site url. But the 'SPSite' object does not work.

Any help would highly be appreciated. Thanks.

1 Answer 1

0

I am guessing a little bit because of the lack of more of your code but are you performing something like the following?

try
{
    using (SPSite site = new SPSite(context.CurrentWebUrl))
    {
        using (SPWeb web = site.OpenWeb())
etc..

"The code gets the context to the current Site using the workflow context, and then opens the current Web and creates a site within it with the specified name."

http://msdn.microsoft.com/en-us/evalcenter/office365trainingcourse_lab_3_2_topic3.aspx

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.