Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer
    
You probably already found this but this is related to your error message. msdn.microsoft.com/en-us/library/ms234762.aspx –  Kernel Panic Aug 16 '13 at 17:20
    
Thanks Bob for your valuable reply. I'm still struggling with this issue though. –  SharepointGeek Aug 17 '13 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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