Update content type in list not working

My list content type is not getting updated.
I have a content type defined in a feature. I have created a new column and updated the feature definition and reactivated the feature.  I have also written powershell to check and update the content type with the new column.  The content type
gets updated but not at the list level.  The powershell looks like this:
Function UpdateContentType($contentType, $fieldLink)
if ($contentType.FieldLinks[$fieldLink.Name] -eq $null)
Write-Host Adding Field to content type
$contentType.FieldLinks.Add($fieldLink)
$contentType.Update($true)
I thought the Update method was supposed to push the changes down, but it doesn't seem to be working.  This code does work in a different environment so I'm not what is going on.
Caroline

You will need to updated the list also, after updating the content type
This is sample code how you update list which is using the Content Type.
IList<SPContentTypeUsage> usage = SPContentTypeUsage.GetUsages(newsCT);
foreach (SPContentTypeUsage item in usage)
if (item.IsUrlToList)
SPList list = rootWeb.GetList(item.Url);
if (!list.Fields.ContainsField(firstName.InternalName))
list.Fields.Add(firstName);
list.Update();
more information you can check at this link
get2pallav
Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

Similar Messages

  • Content Type Description is not adding on list

    Hello
    I have some custom content type on site level and each content type I have different description. When I add content type manually  in existing document library, description is also coming for added content type. But when I add content type programmatically,
    description not coming with content type it is coming as empty. I have used following MSDN article for adding content type.
    http://msdn.microsoft.com/en-us/library/office/aa543576(v=office.14).aspx
    Can one please let me know what am I missing here?
    Regards
    Avi

    Hi,
    According to your post, my understanding is that the description of the content type not displayed in the site while adding the content type programmatically.
    I had tested the code of the above link with a custom content type based on the Document content type, it worked without any issue.
    To narrow down the issue, you can check with the following steps.
    You can recreate a new content type then check whether it works.
    You can use other libraries to check whether it works.
    You can also check the event log and ULS log to see if anything unexpected occurred.
    To check event log, click the Start button and type “Event Viewer” in the Search box.
    For SharePoint 2010, by default, ULS log is at      
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to update content types enheriting from the System Page Content type

    After importing a design package I found out that my content types was missing some columns. I could add the missing columns to my "page" and "Article Page" site content type. When adding the exisiting columns I could choose to update
    everything that inherits from this type:
    This is working. However I still miss 2 columns in the "Page" Content type:
    1. Rollup Image
    2. Hide physical URLs from search
    If I roll back my dev environment I can see that these are inherited from the "System Page" content type which is not editable. The columns are in the "System Page" content type but They are gone in "Page" content type that
    should inherit the columns.
    So how do I update these?
    Thanks

    Hi Alex,
    Thank you for replying. I totally agree with you regarding not to modify the OOB content types. The content types I have created/modified is also my own "new" content types.
    However the designpackage import messed up the OOB content types somehow so I'm only trying to get back to the state before the import. The only thing I see is still missing is the two previously mentioned columns in the "page" content type.
    Do you have any other suggestions in how to get back to the "OOB State"?
    Thank you
    Update: this is my page content type. It's not set to read only so it should update the last two missing columns from its parent (system page content type) right?

  • Cascading Select Lists - Not Working for me

    I am trying to implement Denes Kubicek's Ajax Cascading Select List solution.
    http://apex.oracle.com/pls/otn/f?p=31517:119
    But it is not working for me.
    I'm a newbie to APEX and checked the forum for advice on cascading select lists. I saw the thread for
    "Cascading Select Lists - Not Working" posted by sue and the replies by Varad Acharya, but I'm still
    having issues of not seeing the alerts, not able to run the pl/sql process in SQL Workshop, and not
    getting the expected results.
    I have a list of countries (US - USA, CA - CANADA, etc.) and a list of states for each country. When a
    user selects a country I would like to show the list of states within that country.
    This is what I've done so far:
    Defined an application process:
    Process Point: On Demand: Run ... by a page process.
    Name: CASCADING_SELECT_LIST1
    Process Text:
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    HTP.prn ('<option value="' || 99 || '">' || '- All States -'
    || '</option>'
    FOR c IN (SELECT state_code || ' - ' || state_desc d, state_code r
    FROM tbk_state
    WHERE country_code = :cascading_selectlist_item_1)
    LOOP
    HTP.prn ('<option value="' || c.r || '">' || c.d || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;
    defined and application item:
    Name: CASCADING_SELECTLIST_ITEM_1
    Build Option: - No Build Option -
    Created a 'Form on a table with report' as follows:
    Page 5: Report on TBK_HARDWARE_LOCATION
    Page 6: Form on TBK_HARDWARE_LOCATION
    in HTML Header of the page attributes for 'Form on TBK_HARDWARE_LOCATION' I have:
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    On Page 6: 'Form on TBK_HARDWARE_LOCATION' I have the following items (plus some others):
    Name: P6_COUNTRY_CODE
    Display as: Select List
    HTML Form Element Attributes: onchange="get_select_list_xml1(this,'P6_STATE_CODE');"
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: COUNTRY_CODE
    Named LOV: LIST OF COUNTRIES
    Name: P6_STATE_CODE
    Display as: Select List
    Source Used: Only when current value in session state is null
    Source Type: Database Column
    maintain session state: Per session
    Source value or expression: STATE_CODE
    Named LOV: - Select named LOV -
    List of Values definition:
         select state_code || ' - ' || state_desc d, state_code r
         from tbk_state
         where country_code = :P6_COUNTRY_CODE
         order by 1
    LIST OF COUNTRIES is defined as:
    select country_code || ' - ' || country_desc d, country_code r
    from tbk_country
    order by 1
    Now to the problem:
    I run page 5 (the report) to see the list of locations and then I try to edit a record (page 6). When I
    try to select a different country I get the following error (on IE):
    "Problems with this web page might prevent it from being displayed properly or functioning properly.
    In the future, you can display this message by double-clicking the warning icon displayed in the status
    bar.
    Line: 17
    Char: 5
    Error: Object expected
    Code: 0
    URL: http//cmrac4.cm.timeinc.com:7777/pls/htmldb/f?
    p=114:6:1413254636072443110::::P6_HARDWARE_LOCATION_ID:2
    I don't see any of the alert messages.
    I also tried to run the application process code in the SQL - Command Processor (I replaced
    :cascading_selectlist_item_1 with 'CA' or 'US') and got the following:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
    button, or try again later.
    Only one top level element is allowed in an XML document. Error processing resource
    'http://cmrac4.cm.timeinc.com:7777/pls/...
    <select><option value="99">- All States -</option><option value="X1">X1 - X1</option><optio...
    Can someone help me please?

    Varad,
    First, thank you for taking the time to try to help me with this problem.
    When I view the page's source code (here are the first few lines):
    <html lang="en-us">
    <head>
    <script src="/i/javascript/core.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/i/css/core.css" type="text/css" />
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='Would you like to perform this delete action?';
    //-->
    </script>
    <script>
    function get_select_list_xml1(pThis,pSelect){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    //alert ('Dept no=' + pThis.value);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=CASCADING_SELECT_LIST1',0);
    get.add('CASCADING_SELECTLIST_ITEM_1',pThis.value);
    gReturn = get.get('XML');
    // gReturn = get.get();
    //alert('Enames=' + gReturn);
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue);
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    </script>
    It looks like line 17 is:
    var l_Select = html_GetElement(pSelect);
    I'm still not sure why I'm getting this error and why it's not working?
    Thanks,
    Eti

  • Update content type template for existing sites in sharepoint 2010 ?

    Hi,
    I created one custom document library (list definition) and associated 3 content types which has docment template path (\_layouts.template1.docx). I rollout nearly 200 sites with this definition. now i want to update my document template and also i want
    to change template docx to dotx.
    what is the best approach to apply these changes for existing sites ?
    Thanks,
    Surya.
    suryakumarp

    Hi suryakumar,
    As I understand, you want to update the template 
    for existed content type.
    It can be achieved by programming. There is a
    SPContentType.DocumentTemplateUrl Property, which can be used to update content type.
    Here is a demo:
    http://officepoint.blogspot.com/2008/06/sharepoint-relink-infopath-forms-relink.html

  • HT4367 I turned off the power to my apple tv whilst updating and now it will not work, i have tried to restore using usb but it says unable to find. any help please?

    I turned off the power to my apple tv whilst updating and now it will not work, i have tried to restore using usb but it says unable to find. any help please?

    Welcome to the Apple Community.
    Are you following these instructions.
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Source list, and then click Restore.

  • Update content type definition in sandboxed solution

    In my web application I am using a content type hub. The content type hub contains a sandboxed solution which contains several content type and column definitions like this:
    <ContentType>
    <FieldRefs>
    <FieldRef ID="" Name="" />
    </FieldRefs>
    </ContentType>
    <Field ID="" Name="" />
    Now I need to update a content type definition by adding a new column. In my content type definition in Visual Studio I added the field refence to the column and build a new WSP.
    I am updating the sandboxed solution with PowerShell. First I add the new solution:
    Add-SPUserSolution -Site $url -LiteralPath $newSolutionFile
    Then I update the old solution with the new:
    Update-SPUserSolution -Identity $oldSolutionName -Site $url -ToSolution $newSolutionName
    The old solution is deactivated and the new solution is activated, so the update did go well. But when I go to see the content type, it's not updated. The newly added column did not get added.
    When I manually deactivate the newly added sandboxed solution and activate it straight away the content type does get updated. So it looks like the Update-SPUserSolution command does not update the content type and column definitions.
    Does anyone has experience with updating content types with the Update-SPUserSolution command?

    Hi,
    Please check the link below.
    http://msdn.microsoft.com/en-in/library/ff798382.aspx.
     you can use the Update-SPUserSolution command
    in Windows PowerShell to upgrade your solutions. However, this requires access to the server environment, which is not necessarily available to sandboxed solution developers or site collection administrators.
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • File type associations is not working in the App-V 4.6 SP3

    Hello,
    I found issue, that file type associations is not working in App-V 4.6 SP3. When I try to open associated file with double click I receive next window:
    Translate: This action is only valid for products that are currently installed.
    I have checked associations in App-V Console and in OSD file, everything looks like OK.
    Maybe someone has some ideas?
    Could you please share them with me?
    Thank you in advance.

    Is this only happening on one client machine? If so can you completely clear the application and re-stream\cache it again?
    If that fails, you could try to create the FTA locally on the client
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • Text keeps disappearing when I select it to make type at all / make changes / edit. Type tool is not working. I am running CS6 on a Macbook Pro Retina (which I am hating!) 10.9.4 - wish I'd never upgraded.

    Text keeps disappearing when I select it to make type at all / make changes / edit. Type tool is not working. I am running CS6 on a Macbook Pro Retina (which I am hating!) 10.9.4 - wish I'd never upgraded.
    Photoshop General Discussion

    The RAM needs specs as shown below.
    Maximum Memory
    16 GB (Actual) 8 GB (Apple)
    Memory Slots
    2 - 204-pin PC-10600 (1333 MHz) DDR3 SO-DIMM

  • ZSAPLINK for Object type = CLAS is not working

    Dear Experts,
    ZSAPLINK for Object type = CLAS is not working. On executing by selecting Export Object to Slinkee with Object type = CLAS and class name, It is giving the dump which is shown in below snapshots. Pls guide me how to resolve this error.
    Thanks
    KH

    From the screenshot, It seems that the object  _renderer did not point to any memory location.
    You can verify this by putting a breakpoint in method IF_IXML~CREATE_RENDERER of class CL_IXML
    If the return value RVAL is initial, this mean there something wrong with the kernel module abkm_iXML_CreateRenderer. If it is, you will have to check with your Basis team to apply some kernel patches.
    Hope it helps. Cheers!

  • I installed photoshop cc 2014, but Camera Raw remains on Version 8.0. Update to 8.5 does not work.

    I installed photoshop cc 2014, but Camera Raw remains on Version 8.0. Update to 8.5 does not work.

    Solved in this way:
    Close Photoshop first, then:
    Download the 8.5 manual update link from here:  Don't run the installer, but instead just Open the zip file in Windows Explorer.
    http://swupdl.adobe.com/updates/oobe/aam20/win/PhotoshopCameraRaw8-8.0/8.5.50/setup.zip
    Navigate inside the zip file to find the resources inside that correspond to the 64 or 32 bit Photoshop version that you're running.  I assume you have installed the 64 bit version, so the rest of the instructions will concentrate on the 64 bit Camera Raw.8bi only.  Here's the path:
    setup.zip \ payloads \ AdobeCameraRaw8.0All-x64-050614143245 \ Assets1_1.zip
    The file within Assets1_1.zip, named 1002, is actually the Camera Raw.8bi file for 64 bits, just with a different name.
    Copy 1002 to your folder on your computer where your Camera Raw.8bi normally lives, e.g.,
    C:\Program Files\Common Files\Adobe\Plug-Ins\CC\File Formats
    Rename the old Camera Raw.8bi file to Camera Raw.8bi_8.0.  It's important that the extension is changed to something other than .8bi.
    Rename 1002 to Camera Raw.8bi
    Run Photoshop and verify the Camera Raw version by choosing Help - About Plug-in... - Camera Raw.
    Thank you so much!

  • IPAD 2 ,MY  iPAD IS UPDATED, BUT MAP SOFTWARE IS NOT WORKING PROPERLY ,LOCATION/ROUTE

    iPAD 2 ,MY  iPAD IS UPDATED, BUT MAP SOFTWARE IS NOT WORKING PROPERLY ,LOCATION/ROUTE & DISTANCE ALSO...
    CAN YOU GUIDE HOW TO SOLVE THIS PROBLEM....WAITING FOR SAME.
    VIRAL THAKKER- INDIA.
    ALSO, I HVE SOME PROBLEM IN MACBOOK SOFTWARE OPREATRING SYSTEM IS 10.6.1 AND TRY DOWNLOAD 10.6.8...BUT DON'T KNOW AFTER DOWNLOADING,I M NOT ABEL TO RUN IN MY MACHINE .
    ANY BODY CAN GUIDE ME? TO SOLVE THIS PROBL.
    VIRAL THAKKER INDIA

    Try this: Open up her Home folder (house icon), click Library then Preferences. Locate com.apple.softwareupdate.plst (I don't have my Mac handy so I can't double-check the name; that should be correct) and move it to the desktop or trash, then try running Software Update again. Also try running Software Update while logged in as another administrator.
    ~Lyssa

  • When i finally connected my mac to work network on windows environment everything related to apple including App store, Safari, software updates, iCloud and iTunes do not work using a proxy server and everything else is working very well

    when i finally connected my mac to work network on windows environment everything related to apple including App store, Safari, software updates, iCloud and iTunes do not work using a proxy server and everything else is working very well including chrome browser…i tried everything but no clue...anybody have solution for this..???

    I also forgot to note that this problem also persists with the new iBooks application. I cannot get past the 'Get Started' screen or access the iBooks Store. Again, all top bar menus are unresponsive.
    DT

  • How can I upload my RAW files from my Nikon D750 to my MAC computer? I now have Camera Raw 8.7.1. and updated my camera and still not working:(

    How can I upload my RAW files from my Nikon D750 to my MAC computer? I now have Camera Raw 8.7.1. and updated my camera and still not working:(

    Which version of mac os x do you have?
    Which version of photoshop are you using?
    Do you get any message when you try to open the files into photoshop?
    Did you use Nikon Transfer to get the files from your camera to computer?
    Did you try the File>Get Photos From Camera in Adobe Bridge?

  • After a recent update my acrobat 10 is not working, It says it is missing DATA1.CAB file, help

    Hello, the acrobat 10 fille recently updated & failed & now it does not work. I says it can't fine a DATA1.CAB file, Help.

    It took me a while to find it but it worked when i finally found the right one thanks!
    <user name> library- application support- television fanatic- plugins

Maybe you are looking for

  • Notifications come many times

    For one week, they're getting the notifications many times, it happens with any application. It is very annoying. What should I do?. I tried restoring and still coming. My device is an iphone 4 with iOS 6.1.3

  • 1st generation MacBook not pairing/connecting with Apple Wireless Keyboard

    I just purchased an Apple Wireless Keyboard to use with my iPhone and my 1st generation MacBook. I managed to pair/connect my keyboard with iPhone on my first try. So far, however, I have not been able to pair or connect my keyboard with my MacBook.

  • Trouble with Dropbox app.

    I have the Dropbox app on my iPad and my computer.  I have been using Adobe Reader to complete some fill-in-the-blank PDFs for a class and saving them into Dropbox.  When I open them on my computer, my answers are there, but when I open them on my iP

  • Java in Web application designer

    hi all, can any one tell me where u will be implementing java code in WAD. i mean can u tell me the scenario where we can write java script coding in WAD. thanks in advance.. Ram

  • HT4759 How can I sign into my cloud? Off my iPad

    I need to clear some of my icloud space and I can't seem to log in to do this. Anyone know how? Thanks jamie.