c# - List column is deleted when updating Content Type using web services -
i have large collection of sites use copies of same content type. i'm using web service , calling updatecontenttype methods either webs.asmx or lists.asmx. code below:
contentprops = "<contenttype />"; newfield, modfield = "<fields />"; delfield = "<fields>" + "<method id=\"1\">" + "<field id=\"fieldid\" />" + "</method>" + "</fields>"; //...snip xmldocument.loadxml() create proper xmlnodes listsvc.updatecontenttype(listname,contentid,contentprops,newfield,modfield,delfield,"true"); or websvc.updateconenttype(contentid,contentprops,newfield,modfield,delfield);
the field deleted content type column list. want remove content type, retain column in list. documentation i've read specify field removed contenttype not list itself.
sharepoint automatically updates lists using content type when content type changes, scenario not apply when content type site content type applied list , site content type deployed using sharepoint feature.
readup more on check out following links:
Comments
Post a Comment