locked
Quick part not updated after content type's document propety is updated RRS feed

  • Question

  • I create a field in a feature with the following element.xml and feature.xlm:

    element.xml:

    <? xml version = "1.0 " encoding = "utf-8 "?>

    < Elements Id = "ad3ac1ea-5fa1-4873-9c0c-c80ab7f0ff21 "

              xmlns = "http://schemas.microsoft.com/sharepoint/ ">

      < Field ID = "{00c13c13-5a25-47ca-8a4d-1ad3f5ed0232} " Type = "Text "

        StaticName = "ProjOwner " Name = "ProjOwner "

        DisplayName = "ProjOwner " Description = "ProjOwner "

        Group = "_CLM_Project " Required = "FALSE " MaxLength = "255 "></ Field >

    </ Elements >

     

     feature.xml

    <? xml version = "1.0 " encoding = "utf-8 "?>

    < Feature Id = "18dd694f-b77a-4bbb-8364-c3c7383cfe59 "

             Title = " Lists "

             Scope = "Site " Version = "1.0.0.0 " Hidden = "FALSE "

             DefaultResourceFile = "core "

             xmlns = "http://schemas.microsoft.com/sharepoint/ ">

      < ElementManifests >

        < ElementManifest Location = "ICo.IT.CLM.SharePoint.SiteFeatures.Lists\element.xml " />

      </ ElementManifests >

    </ Feature >

    I have created document content type that has the above field assigned to it.In the world document that I am using as the template of the content type I am using a quick part to display the value of the content type field in the body of the document.

    I am using the content type in the document libraries in my sub sites.

    The problem is that when I create an instance of that content type in a document library the quick part looses its link with the content type field. Meaning updating the properties of the document does not affect the quick parts in the body of the document for that specific field. whether i update the document property in Sharepoint interface or in the document information panel.

    It is not the case with other out of the box fields and the fields created manually.

    Am I doing anything wrong?

    Monday, February 7, 2011 8:56 PM

All replies

  • Did you ever find a solution to this? Did you try setting a values for SourceID on your field definition? Any value will do as long as it's unique to the site collection. I typically use something like this:

    SourceID=http://schemas.<company>.com/<projectname>/<featurename>/<fieldguidwithoutbraces>

     


    string fakeEmail="jim.duncan@sharesquared.spam.com"; string realEmail=fakeEmail.Replace(".spam","")
    Thursday, October 13, 2011 5:56 PM