开发者

Why do I get this error in SPFieldCollection.AddFieldAsXml()? "The specified field name is too long"

开发者 https://www.devze.com 2022-12-13 07:05 出处:网络
I am getting an error when I call SPFieldCollection.AddFieldAsXml(). Why is that?Here is the string I\'m using:

I am getting an error when I call SPFieldCollection.AddFieldAsXml().

Why is that? Here is the string I'm using:

"<Field Type='Note' Required='FALSE' NumLines='6' RichText='FALSE' Sortable='FALSE' ID='{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}' StaticName='tempField' Name='tempField' />"

Natural开发者_高级运维ly, I'm using a different guid.

EDIT: MOSS2007/WSS3.0 EDIT2: Rephrased as question.


I forgot the DisplayName attribute. The following works:

"<Field Type='Note' Required='FALSE' NumLines='6' RichText='FALSE' Sortable='FALSE' ID='{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa}' DisplayName='tempField' StaticName='tempField' Name='tempField' />"

0

精彩评论

暂无评论...
验证码 换一张
取 消