Hello all,
I am using an InfoPath 2010 web browser form with Blackpearl version 1320 in a Visual Studio 2010 development environment. For testing, I have a few lines of C# code in the form to populate a text field on form load (see below).
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
XPathNavigator Main = this.CreateNavigator();
string CodeTestString = "Test for having code in a web form.";
Main.SelectSingleNode("/my:myFields/my:CodeTest", NamespaceManager).SetValue(CodeTestString);
}
I intiate the workflow through a SharePoint 2010 form library that is integrated to the workflow. The initial submission of the form works as expected and the form submits successfully. An email notification with the link to the worklist item is sent to the The next step in the workflow is an approval that has a Task Action Field mapped to an Approval drop down on the form. When the approval worklist item is opened from the email notification or K2workspace, the Approval drop down is either empty or contains "There are no actions configured..."
I'll attach the solution for reference.
I tried the form with no code, and the Task Action Field populated as expected and the workflow completed, I am therefore suspecting it is related to the sandboxed code in the form.
Any help would be appreciated.
Thanks,
Andrea