Best way to get CAML for a custom content type

  • Best way to get CAML for a custom content type Rob

    I am trying to get the CAML for a custom content type that I am creating. What I am really doing is creating the content type in Visual Studio 2010 and then deploying that content type to my sandbox. At that point, I am modifying the content type using the SharePoint interface (i.e changing advanced settings, adding columns, etc). What I would like to do, is after I have made my changed, update my CAML in Visual Studio to match my changes.

    I want to do this because I am creating custom fields and content types for my project and want to create a solution with these customizations. Since there doesn't seem to be a way to do this (create custom fields and content types) as a solution using SharePoint without putting them into a list, I am using Visual Studio and CAML for this. I also want to use Visual Studio and CAML so that I can put these CAML xml files in source control so that I can version my custom fields and custom types.

    I have tried using tools like but that doesn't seem to work with SP 2010.

    Does anyone have any suggestions? I wish Visual Studio would just have an update from SP button after I have deployed my solution and made changes on the server so it would sync VS from the SP server.

  • Have you considered using LINQ to SharePoint?

    At least use it when developing and then use the Log property of the data context and write all the generated CAML to a file.

  • SharePoint Manager 2010 is what I ended up using. This gives me what I need (plus alot of other features). It's not ideal as that would be some way to update the Schema Xml directly in VS of my custom content types and custom fields but this will do.

caml-query development content-type
Related questions and answers
  • ;/RenderPattern> In WSS 3.0, this would render the 2nd column in the field as a hyperlink in the LVWP, which is what I want. In SharePoint 2010, I tried adding TRUE to my field type definition...Has anybody upgraded an old custom field type to use the new XSL transform in SharePoint 2010? I have a multi-column field type, and want the Display pattern to render the 2nd "column", which... that is supposed to be the new and improved way of doing this. Unfortunately, I can't get that to work either. I am getting the same thing I got using the RenderPattern. I'm no XSL expert, so can anyone

  • This is mainly a verification question as I have been fighting with an issue for a couple of days now. I have two lists derived from 2 custom content types. Both content types used the task base content type. Each of the derived content types have custom form rendering templates. I am using a custom usercontrol with codebehind added to the .ascx page as a control to redraw the forms differently... did on the other form. I am wondering if it is because both lists share the same type number (107) or if it might be something else. So does each list need to have a custom type number or does

  • Is it possible to use the Content Query web part to filter on multiple specific content types that do not have a parent/child relationship? I have a requirement to show Events (from a calendar) and Announcements (from an Announcement list) aggregated in the same area but as these come from two different branches in the content type tree, I can't do this via configuration of the web part. Would... implications to be aware of i.e. do the content types need the same site columns for the fields you want to display? I'm looking to do this in SP2010 but would be interested to know if the same applied for MOSS.

  • updates have been done in SPD (with copy/paste deployment). Ideally I want to be using Features/Solutions and have all code checked in to TFS via Visual Studio. My question is is it possible to reverse engineer the site (using something like SPSource or VSEWSS) so that we can redeploy all master pages, page layouts, content types, site columns, css, images, xsl etc. and then adopt that method from then on. I can (and will) do some testing of this myself but I wanted to throw it out there to get others' experience with this type of thing. My concerns are that IDs might differ and that pages may

  • How can I get the selected language in the screenshot, from inside of a webpart? alt text I'm using SharePoint 2010. My webpart is a "visual web part" created in VS2010. I'm trying things like SPContext.Current.Web.CurrentUser.RegionalSettings and SPContext.Current.Web.Language" but ofcourse these things have nothing to do with that setting. :-| Can someone please help me? What property am I looking for.

  • post Infrastructure Update - in my situation it was applying SP2 but it might have been one of the culmlative updates after IU A search pre-SP2 using contentclass:STS_Site as a filter will list all... only site collections/sites using non-publishing templates. All other content is availble e.g. documents, lists Has anyone else come across this? UPDATE 08/05/10: I have been doing some further...This is an old issue I thought this was a bug in an specific environment after reading a couple of blogs it has made me think again... The issue is that SharePoint site collections and sites

  • I have been developing on SP 2010 for a while now. Mostly I have been working with the Client Object Model. Though I am at a point where I need to read out the UserProfiles from inside SharePoint. I see no other way to do this than to make a custom WCFService and deploy it to SharePoint. So that is what I did. I made an "Empty SharePoint Project" and added the mapped "ISAPI" folder. The code from the WCF Service: public string GetUserByName(string _name) { string server = "http://esddev72"; UserProfileManager profileManager; string s = ""; string u

  • I'm just wondering if Content Types are always only made out of Site Columns, or if it's possible to define Fields that only exist on that Content Type? (Like how you can add a custom Column to a list) I'm currently creating some Content Types in Visual Studio using Elements.xml and just wonder if I'm "polluting" site columns with fields that are only useful on that content type.

  • I have a document library using a document set content type. I can create a new document set through the UI and it works perfectly. I'm now trying to create a document set in this library... for the set looks like a folder instead of the document set icon clicking on the document set doesn't show the document set home page, it just behaves like a normal document library running CAML queries shows that both internal fields HTML File Type and ProgId should be SharePoint.DocumentSet but instead they are blank changing a field value on the document set folder doesn't propogate to its contents

Data information