Ինչպես խմբագրել InfoPath թեմա ֆայլը Ֆորում գրադարանում Programmatically է Sharepoint 2007

The ստորեւ տողեր կոդը պատառներ է թարմացում infopath որոնում գրառումը(ֆայլ)

SPWeb _web = SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];

MemoryStream myInStream = new MemoryStream(item.File.OpenBinary()); XmlTextReader ընթերցողը = new XmlTextReader(myInStream);

XmlDocument վավեր = new XmlDocument(); doc.Load(ընթերցող);

reader.Close(); myInStream.Close();

XmlNamespaceManager nameSpaceManager = new XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“իմ”, “HTTP://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);

doc.DocumentElement.SelectSingleNode(“իմ:Ստատուս”, nameSpaceManager).Ներքին Text = “Պահված”; […]

«Այս երկը փոփոխվել SHAREPOINT համակարգին" Սխալ, իսկ Թարմացվում InfoPath XML ֆայլը SharePoint գրադարանում

Եթե ​​դուք փորձեք թարմացում InfoPath XML ֆայլի միջոցով օբյեկտ մոդելի Իրադարձություններ / WebParts կամ ցանկացած միջոցով.

Չնայած այն execting Item.Update() կհանգեցնի ստորեւ սխալ. While updating the InfoPath xml file in ListItem the file and ListItem object getting disconnected.

Item.File.Update() կլուծի Ձեր հարցը.

StackTrace […]