I had the following exception thrown at me today when trying to add a site column using AddFieldAsXml method: "The local device name is already in use".
The reason was that my XML contained a field ID - which is what the XML for a field is supposed to have when it is used as an element file in a feature, but not when you are adding the field using code. So - beware!
Sharepoint Tips And Tricks is Ishai Sagi's sharepoint information blog. It specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices for the use of Microsoft SharePoint Server and Windows SharePoint Services. It also provides some related Office Information, including VSTO and VSTA and other office application development tips.
Monday, July 05, 2010
"The local device name is already in use" error when using AddFieldAsXml
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment