Tag Info

Hot answers tagged

3

Interesting - I used this very scenario (upgrading a field from text to note) in a demo recently in a conference talk, to show off SharePoint 2010's new upgradable Features framework. In both SP2007 and SP2010, changing the type of fields which are in use is unsuppported, as you've discovered. My recommendation would be: Take a backup in case rolling ...


3

Hello Michal: There is nothing out of the box that would offer that functionality. Indexes are unique on a per column-basis and each column index is independent. The ItemUpdating event receiver is the best place to do this. You could simply have the event receiver query the list to see if a duplicate record exists before the item is created or saved.


2

I had changed a field definition's property and found that the new definition was synced to the subscribing site after also republishing a content type that was using the customized site column. I did this on SharePoint 2010, and only had one content type that was using the customized site column. In this case I had changed a Date/Time field's default value ...


1

Did not get your code clearly, what is fieldId and how are you getting this fieldId? my guess is location is already there in the content type you can not add the same field again, create a new field if you wish, in that case your code will be (after foreach) - string fldName = fields.Add(fieldToAdd.Title, fieldToAdd.Type, fieldToAdd.Required); SPField ...


1

Regardless of your encoding problem, updating the xml that was used to create fields will not push down the changes to existing fields based on that xml. If you want to update the DisplayName for existing fields, you would have to write some code (in a FeatureReceiver) to do this for you.


1

I have only seen this problem when fields were created as Number field, like <Field Type="Number" DisplayName="DemoNumber" Required="FALSE" Group=" Demo Field" ID="{1221b2d2-992d-4abf-a80a-55585c234c55}" SourceID="{e834bd2e-72bf-4aab-9ef4-4f3e118526e2}" StaticName="DemoNumber" Name="DemoNumber" Decimals="0" Percentage="FALSE"/> Did you by any chance ...


1

This has been answered on this forum previously. Check out this link: How to adjust the title column in custom content type in SharePoint 2010? It was the top result on Google when I was trying to find you some relevant reference material. Also check out this link: ...


1

Maybe instead of using the ItemAdded event, you could try using the ItemAdding event? Example What you also could do is create a workflow on the listitem that activates when the item changed. First check if the "Issue ID" is not empty. If so, than send an email to a group. To let users subscribe to an "alert", I would create a webcontrol where users are ...


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

What you need to do to ensure that the fields you don't want to see are not exported, is create a view that shows only those fields that you want to see and export that view. As far as the "Path" that field is exported by default, and you will have to manually delete it from the excel spreadsheet.


1

Have you tried this for other fields than Title? The spec for SPField.EnforceUniqueValues states that You cannot set this property to true for a built-in field or for a site column. Not 100% that this is valid for the declarative approachs for custom schemas, but test with another field "test" of type text and you will find out...


1

You are correct - InternalName and GUID must both be unique. If you don't specify an InternalName, the DisplayName will be used to generate one, and as this is the same for each, you're getting a collision. As to why the GUID as well - good question, much like why list items have both a GUID and an ID that is unique in a list. Still, it's worth noting that ...



Only top voted, non community-wiki answers of a minimum length are eligible