It’s time for me to answer those content types questions I got during the web cast the other day. I really appreciate all of the great questions that I got after the event. The answers here should roughly match what I gave verbally – with the possibility that I interpreted the question slightly differently then.
Q: Have you seen implementations that deal with document collections containing very large (> 1GB) files?
A: No, however, I strongly recommend against storing files of this size in SharePoint. That’s not what SharePoint is optimized to store. A traditional digital asset management, or content management application may be more appropriate depending upon the specific needs.
Q: Could the ship to/sold to fields (defined in the demo) be drop down lists in the word document template?
A: Yes, No, and Yes. Yes, it’s possible to define a choice field and get the results to appear in a drop down list. (Reading between the lines) No, it’s not directly possible to populate a drop down box from a back end system. (Again reading between the lines) Yes, if you develop a custom Document Information Panel (DIP) you can do anything you would like including querying back end systems.
Q: What happens to users not running Office 2007 when a custom template (.dotx) is used for a content type?
A: If they’re running Office 2003 with the file format extensions, they’ll still see the template. If they’re running an older version and thus the template doesn’t make sense, Word will throw an error that the file format isn’t recognized.
Q: Can I use site columns/content types to search across site collections based on common columns/features?
A: You can use site columns and content types to support. The white paper that I wrote last year, “Managing Enterprise Metadata with Content Types” (http://go.microsoft.com/fwlink/?LinkId=101604&clcid=0x409) will help you better understand how search can leverage site columns and content types.
Q: How do you get the FieldRef IDs for existing site columns?
A: There are several ways – you can pick it out of the URL when looking at an existing site column, or you can look at wssfields.xml which declares the WSS fields.
Q: Is it possible to have custom columns added to the metadata of a document, so that the metadata “stays” with the document?
A: In the new document formats a copy of the metadata goes with the document (crack the DOCX file open by renaming to ZIP and extracting it. You’ll find that there are properties for all of the content type columns)
Q:I thought Title was a default item field that is needed as the record identifier. If you remove the title field, how can you set a record identifier?
A: The slide was a bad example, you should never remove the title field because it always expected to be there. However, in a document library items are organized by path and file name.
Q: How do you install Visual Studio Extensions for SharePoint on a development box that is not running Windows SharePoint Services?
A: You don’t. You want to do your SharePoint development on a server. That server can be a virtual machine, but a server OS is “required”. I’m aware of the Bamboo Solutions technique for installing Windows SharePoint Services on Vista – however, I don’t recommend it.
Q:When creating a custom content type as a feature, how do you configure the CAML to allow for the management of content types by default?
A: This is more of a list definition issue. The <List> CAML tag has an attribute EnableContentTypes which turns on the item that you’re describing.
Q:Can you bind custom actions to content types?
Q: For event receivers, how do I know that my ItemUpdating event is firing for editing the document, or other specific operations?
A: I’d do this observationally by watching what the pre and post operation data looks like.
Q:Are the Visual Studio Extensions for Windows SharePoint Services available for Visual Studio 2008?
A: Yes, http://www.microsoft.com/downloads/details.aspx?FamilyID=7BF65B28-06E2-4E87-9BAD-086E32185E68&displaylang=en
Q: If you’re using a Guid from a development server would you be able to deploy that to a production server?
A: Yes, because you’re defining the guids in your features – and thus they will match between environments.
Q: Are there additional webcasts planned to cover attaching forms to content types and workflows?
A: Not at this point – however, I can tell you that this is one of the topics I’m proposing for a future web cast.
Q: You’re using the SPVM development image, how can you use multiple instances of this virtual machine in an environment with multiple developers?
A: Just set virtual PC to NAT so that the servers don’t really see each other. It may give a warning but the warning is harmless.
Q: Is it possible to define custom controls to allow for the input of data?
A: Possible, yes. You can look at field controls but there are lots of limits to what can be done. I’d suggest starting your search there.
Q: What are the differences when defining a field between Display name, name, and static name?
A: The answer I have is that the StaticName is used by the Office clients and it’s not recommended that we use this attribute. It’s recommended that we only use the Name attribute. Although in practice using the StaticName hasn’t appeared to harm any of my solutions. Display name is what is displayed to the user. Name is the internal name of the field.
Q: When making modifications to content types, deployed using a feature, how are the updates generally handled to instances of data?
A: Well, if you delete a field, the data goes away. If you add a field it’s available to have data in – this presumes that you’re pushing the content type changes through. That requires special code in a feature receiver because the feature itself doesn’t push the content type changes down.
Q:Can you have a lookup field in a content type?
A: Technically the syntax supports it but it doesn’t work well in practice. There are issues with lookup fields being designed to work within the same SPWeb but content types are declared at the SPSite scope.
Q: Can I create a special page that allows me to enter the data for the content type?
A: Yes, you can override the new form of a content type with a form that you specify. There are techniques for interacting with the out of box list form controls – however, generally I recommend starting from scratch to do your own data input.