2

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 [...]

1

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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