【问题标题】:Infopath Custom Task Form Updation : System.xml.xmlexceptionInfopath 自定义任务表单更新:System.xml.xmlexception
【发布时间】:2012-11-19 23:06:49
【问题描述】:

我创建了一个工作流来创建任务并使用自定义信息路径表单批准该任务。在单击批准/拒绝按钮时,任务表单引发 XML 异常为

“日期”是一个意外的标记,预期的标记是“=”。

下面我列出了异常的堆栈跟踪,


Server Error in '/' Application.

'Date' is an unexpected token. The expected token is '='. Line 1, position 22.

 Description: An unhandled exception occurred during the execution of the current web request.

Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details:
System.Xml.XmlException: 'Date' is an unexpected token. The expected token is '='. Line 1, position 22. 
Source Error:  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:  [XmlException: 'Date' is an unexpected token. The expected token is '='. Line 1, position 22.]   

System.Xml.XmlTextReaderImpl.Throw(Exception e) +95   
System.Xml.XmlTextReaderImpl.ParseAttributes() +5089862   
System.Xml.XmlTextReaderImpl.ParseElement() +378   
System.Xml.XmlTextReaderImpl.ParseDocumentContent() +429   
System.Xml.XmlReader.MoveToContent() +22   
       Microsoft.SharePoint.Workflow.SPWorkflowTask.GetExtendedPropertiesAsHashtable(SPListItem task) +289   
Microsoft.SharePoint.Workflow.SPWorkflowTask.SetWorkflowData(SPListItem task, Hashtable newValues, Boolean ignoreReadOnly) +471   
Microsoft.SharePoint.Workflow.SPWorkflowTask.AlterTask(SPListItem task, Hashtable htData, Boolean fSynchronous) +110   
Microsoft.Office.Workflow.WrkTaskIPPage.XmlFormControl_OnClose(Object sender, EventArgs e) +700   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.CloseDocument(EventLogStart eventLogStart) +113   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.PlayServerMessages(EventLogStart eventLogStart) +192   
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBindHelper() +428
Microsoft.Office.InfoPath.Server.Controls.XmlFormView.OnDataBinding(EventArgse) +97
System.Web.UI.WebControls.WebParts.Part.DataBind() +42   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
System.Web.UI.Control.DataBindChildren() +11046927   
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182   
Microsoft.Office.Workflow.WrkTaskIPPage.OnLoad(EventArgs ea) +3270   
System.Web.UI.Control.LoadRecursive() +66   
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

【问题讨论】:

    标签: sharepoint infopath


    【解决方案1】:

    试试这个可能有用...

    您必须在任务创建属性中具有扩展属性声明。只需在可用空间中添加 x0020 即可。代码可能看起来像

    SPTaskCreate_TaskProperties.ExtendedProperties["Start_x0020_Date"] = DateTime.Now;
    

    而不是

    SPTaskCreate_TaskProperties.ExtendedProperties["Start Date"] = DateTime.Now;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-11
      • 1970-01-01
      • 1970-01-01
      • 2013-04-09
      • 1970-01-01
      • 1970-01-01
      • 2011-09-01
      相关资源
      最近更新 更多