Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When defining a new field using CAML in a feature definition I can define a the Name of the new field and the StaticName. What is difference? Should I define both? And how big is the explosion if those fields don't match?

MSDN states:

StaticName: Optional Text. Contains the internal name of the field.

Name: Required Text. The name of a field. This is the internal name of a field and is guaranteed never to change for the lifetime of the field definition [...]

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I just ran across the same situation. I had imported some lists from SharePoint into VS2010 and saw StaticName in the definition. I never used it before. I deployed my custom lists without StaticName (and they always worked correctly), and then imported my list into VS2010, and StaticName was set. It appears SP takes care of it for you.

share|improve this answer
1  
Indeed, the StaticName is only used within SharePoint internals and not used from the object model when doing custom code, etc. You should have no need to populate that on your custom column definitions. –  John Chapman Nov 23 '11 at 17:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.