Compiler Error Message: CS1061

I created a whole process that just launched. After I began making the necessary fields required, the form suddenly started throwing this error…

Compiler Error Message: CS1061: ‘_Default’ does not contain a definition for ‘FORM_DRAFT’ and no extension method ‘FORM_DRAFT’ accepting a first argument of type ‘_Default’ could be found (are you missing a using directive or an assembly reference?)

It’s looking like the error is that Form_Draft has a default of “N”. So I go to the data tab to change it. I removed the “N” then tried launching a request again and I got the same error.

Has anyone else encountered this issue?

I have the same issue. Did you find a way to fix it?

Hi @asullivan78 ,

The problem in @athomas’s case was that the browser used had extensions that were corrupting the proper save of the form. It was adding arbitrary HTML to the source which was causing this issue.

Please open a ticket in our helpdesk site so we can investigate the issue.

Regards,
Eddy.

Just want to share the same experience with this error

This error that complains about _Default’ does not contain a definition for ‘FORM_DRAFT’ is because the default.aspx page is generated by Form Designer and it fails. A normal generated default.aspx page should contain all the fields defined in the Form Designer. You can find this generated file under \wfgen\wfapps\webforms[YOUR_PROCESS]\v1\default.aspx

In my case when I got this error and I checked the generated default.aspx file the content looks like this:

<%@ Page Async="true" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" MaintainScrollPositionOnPostback="true" EnableEventValidation="false" %>
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<%@ Register Assembly="WorkflowGen.My" Namespace="WorkflowGen.My.Web.UI.WebControls" TagPrefix="wfg" %>
<span>Error:</span><div>Object reference not set to an instance of an object.</div><span>Source:</span><div>Advantys.Workflow.Processes.Design</div><span>StackTrace:</span><div>   at Advantys.Workflow.Processes.Design.ProcessFormManager.SetGlobalListDataSource(HtmlDocument doc, HtmlNode htmlNode, Boolean includeListOnDataBoundEvent)
   at Advantys.Workflow.Processes.Design.ProcessFormManager.HtmlToAspx(String html, CodeBehind& codeBehind, Dictionary`2& resources, Boolean isMultiLang)</div>

The content indicates that there is an error about a configuration of the global list. This error throws an exception and the error message is inside the default.aspx page.

Since the page content is invalid running the webform will complain about missing all the fields. The first field item that WorkflowGen will check is FORM_DRAFT.

The solution to this is in my case is to remove the global list binding one by one to make sure there is no incorrect configuration that fails the generation of the default.aspx file. Once I removed the one that caused the issue, I was able to save the form and the process again and the default.aspx content becomes normal.

So you may want to check your relevant error message inside the default.aspx and correct the configuration accordingly