I have a workflow process in which I need to change the InfoPath view before uploading the document at several different stages. I tried installing the Change InfoPath View Wizard from the black market but it did not add any wizards to my toolbox (I did reset the toolbox several times)
Then I tried to use a server code event as show below but it did not work either. (The name of the InfoPath form is "Simple Approvals")
using
using
using
using
using
using
using
using
using
using
namespace
{
{
{
xmlDoc.LoadXml(K2.ProcessInstance.XmlFields.
K2.ProcessInstance.XmlFieldsc0].Value = xmlDoc.OuterXml;}
}
Any ideas?
thanks,
Luis
ExtenderProject_8d54de7eea4440bf8e25630e017124ea public partial class EventItem_bacf4fb1d49548788f22f64a80796f5a :ICodeExtender<hostContext> public void Main(Project_8d54de7eea4440bf8e25630e017124ea.EventItemContext_bacf4fb1d49548788f22f64a80796f5a K2) XmlDocument xmlDoc = new XmlDocument(); "SimpleApprovals"].Value.ToString()); XmlNode k2Node = InfoPathHelper.GetK2Node(xmlDoc); InfoPathHelper.SetK2FieldValue(k2Node, "DocumentView", "ReadOnlyView"); hostContext = Project_8d54de7eea4440bf8e25630e017124ea.EventItemContext_bacf4fb1d49548788f22f64a80796f5a;SourceCode.Workflow.Common.Extenders;SourceCode.Workflow.Common;SourceCode.KO;System.Xml;System.Drawing;System.Collections;System.ComponentModel.Design;System.ComponentModel;System;