Tag Info

Hot answers tagged

11

The design intention of content types is to support re-use of the list schema (or behaviours). So if there is a requirement to create a lot of lists with the same structure, which is often the case, then the content type enables this. It would be unacceptable to have to create list schemas individually in this situation and would result in repetitive ...


9

Creating site columns is the right way to go. You can add a list column to a list or library that is associated with a content type, but it isn't the same. The point is really to define your data properly. I kind of think that it is more likely that you are "polluting" the environment when you create the same field 10x as a list field versus a Site ...


9

Q: Is there a max number of columns in a sharepoint list? A: SharePoint Server 2010 capacity management: Software boundaries and limits / Column limits Q: Can we use reporting services to read from two lists? A: Yes: if you are using SQL Server 2008 R2 reporting service Q: Is it possible to display information from two lists in a single view even if the ...


8

Do you try this solution? In this solution you should modify field declaration on a view through SharePoint Designer.


7

AvailableContentTypes is a read-only collection. Use SPWeb.ContentTypes instead.


7

Open the AllItems.aspx page for the specific list. Search for the <ViewFields> tag List item LinkToItem="TRUE" to whichever column you want the link: <ViewFields><br/> <FieldRef Name="Attachments"/><br/> <FieldRef Name="LinkTitle"/><br/> <FieldRef Name="linkThisColumn" ...


6

The solution is two fold - first the content type defination needs to have inherit set to false, and the title column needs to have sealed to true (see below). Second issue is that the view will still show title (but the add new item form will show the correct display name). To correct the view a custom list must be defined <?xml version="1.0" ...


6

What Bill (@SPDoctor) said. It depends. Related to #3, as the solutions you work with get larger, you will tend to split up your solutions across several Site Collections. Since Content Types has site collection scope, this can become a problem if you dont want to have redundant maintenance of your content types. To solve this you can use the new SP2010 ...


6

In the Column Validation settings (Edit the Column and it is an expandable section near the bottom) you can use this formula: =ISNUMBER([My Column]+0) Just Replace My Column with your actual Column's name


6

Next time you perform the changes to the ContentType make sure to push changes to the lists while updating the ContentType. For now, you might need to perform some clean-up job here, just to make sure the field is deleted from all the lists, with your Custom ContentType. Use the following PowerShell script for clean-up! VĂ„rsegod :) Add-PSSnapin ...


6

Solution Packages - whether Farm or Sandbox - are still the way to go for deploying site columns and Content Types. With an "app", you can only deploy these artifacts to the app itself, not to the host SharePoint site (and I'm a little peeved with Microsoft for not making it more clear what you can and can't do in an app). And yes, Sandbox solutions are ...


5

yes, it is possible. In technical terms, you need to create a new field type. Check the article below in SharePoint SDK to get started. http://msdn.microsoft.com/en-us/library/bb862248.aspx


5

You could utilize the content syndication hub and create a site column there. Add it to an item content type and syndicate that content type to all site collections. At which point that column should become an option to use in all site collections. This is in theory of course but it should work.


5

I am assuming you provisioned the column as a site column. So, the next thing is to make sure to push the changes to the down to lists and content types where this site column has been referred (which apparently you haven't done it). So, I would recommend to delete the old definition and provision the column again! See an example below where I am using the ...


5

From SP2010 and forward we have not used solutions / features for this. Instead we use PowerShell to do this programmatically using server side API's. By doing this we avoid "unghosting" the content types (as doing it declaratively does) and we also avoid having to deploy a package which include resetting IIS. In SP2013 we continue doing this, but since we ...


4

I have created a blog post on how to deploy a content type and its fields on SharePoint 2010 using Visual Studio 2010. Can you check if my approach is similar to yours? http://www.koenvosters.be/post/howto-build-a-deployable-content-type-for-sharepoint-2010.aspx


4

Isn't too difficult really, in the FeatureActivated method, you just create a new SPieldLookup (using SPWeb.Fields.AddLookup() for the SPSite's RootWeb), and set the properties for the SPFieldLookup as required. First time doing it? Bit tricky if you've never made a FeatureReceiver before, let me know if you need a tutorial do that, and here's some sample ...


4

Out of the box, there is no easy solution. I recently had to move some site columns from development to production and had to resort to some custom PowerShell script. There's also no easy way to copy content types to another environment and/or collection. In short, it can be done but you'd need to write some custom PowerShell to do it.


4

There must be an existing field with that Guid in your content database. Have you tried it with a different Guid? Or possibly there is a field with the name Tab1Link but a different display name, or hidden. You might try a different name also.


4

I always create Site Columns and Content Types. Harsh experience has told me that anything implemented will probably seen as a cool idea by someone and will request it to be implemented elsewhere on the same site collection. If you have a hierarchy of content types in use across multiple lists inside web sites, and a change request means you need to, for ...


4

SharePoint has no ability to assign meta-data to a Site Collectin or site directly. There are a few approaches to simulating it for the purposes of search and navigation: 1 - Use the Site Directory. although the 2007 Site Directory was deprecated, it still exists on SharePoint 2010 (for upgrade compatability) and you can turn it on and use it the same as ...


4

Yes, you can specify it. Example: public static readonly Guid MyFieldId = new Guid("{CC1E421C-29BE-4373-81D0-55D5D64B2E3D}"); public static readonly string MyFieldDefXml = "<Field ID=\"{CC1E421C-29BE-4373-81D0-55D5D64B2E3D}\"" + " Name=\"MyFieldName\" StaticName=\"MyFieldName\"" + " Type=\"Text\" DisplayName=\"My Field Name\"" + " Group=\"My ...


4

They are documented here


4

Ever since v1 of SharePoint Team Services, Microsoft has used OWSSVR.DLL to remotely invoke functions against SharePoint. It is part of SharePoint Foundation Remote Procedure Call (RPC) protocol. To read more about the OWSSVR.DLL command follow URL Protocol from Microsoft Blog. The query: ...


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

Yes. What you'd need to do is first add the new column to the Site Columns (SPSite.RootWeb.Fields), then add it to the FieldRefs of the SPContentType, again at the RootWeb level. You then need to iterate over the ContentType Usages in that site, to add the column to whereever it's being used, to push the changes throughout the site. You'll need to do all ...


3

The content types and columns won't be removed automatically when you deactivate the feature or retract your solution unless you implement a feature receiver to do this through the object model. Even then it will probably throw an exception if the content type is in use anywhere in your site. If you need to make changes to a content type that you already ...


3

To the first question - yes. Some data is common across many places. For example, you might have a 'Financial Quarter' site column, and this could be used in many places; the financial quarter is still the financial quarter whether it's an expense request or a report of some kind, so it makes sense to be able to share that column between types. Conceptually, ...


3

I know that the fields order is from schema.xml To chenge the order the key is : SPFieldLinkCollection.Reorder MSDN : http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldlinkcollection.reorder.aspx http://www.directsharepoint.com/2011/11/change-column-order-in-new-and-edit.html



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