Upgrade SharePoint Content Types / Site Columns declaratively in SharePoint hosted apps

Hi!
I have a question where I was unable to find any official guidance for. I have created a SharePoint hosted APP where I have multiple site columns and content types (declared in XML). The APP installs and functions just fine. 
Now I have a requirement to change a site column (Choice field, just add some more choice values). I was able to update the site column but the changes will not be reflected on the list column (I think because there no way to push the changes).
So is there an "official" way of changing site columns?
Any help is appreciated!
Thx!

msdn -
How to: Update app web components in SharePoint 2013 :
We do not support changing the data type of a list or content type field (column) after its initial deployment in any
circumstance. In particular, do not change the data type of a field as part of an app update (not
even programmatically). As an alternative, you can add a new field. If the app includes custom item create, edit,
or view forms; be sure to make corresponding changes in these forms. For example, add UI for the new field and remove UI for the old one. (In a provider-hosted app, you can programmatically move data from the old field to the new one and then delete the old.
How to: Update apps for SharePoint
[custom.development]

Similar Messages

  • How to make New Document and Upload Document to have same Content Type in Document Library in Sharepoint 2010

    Hi,
    How to make 'New Document' and 'Upload Document' to have same content type(Custom) in Document Library in Sharepoint2010.
    Note : I have created custom Content Type since I have custom columns along with upload column..
    Regards, Shreyas R S

    go to library settings 
    Change new button order and default content type
    set your custom content type to be #1
    when you upload new document it will automatically have your custom content type
    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

  • Assigning External content type field column value using Client Object Model

    I have a problem assinging External column value to ListItem object with client object model-based application I'm developing. To be precise, I am able to retrieve data related to external content type by reading external list created from this content type
    but I don't know how to properly use it to assign value to this field. By doing some research on my own I concluded that BDC ID column from external list is the way to go since it uniquely defines selected row from external list but that doesn't
    tell me much since I don't know what to do with it. Currently I ended up with partial solution - to assign plain string value of picker column but that makes this value visible only in "View Properties" option on Sharepoint and not in "Edit Properties"
    which pritty much makes sence since it isn't properly related to rest of the data in specific row. Does someone have a better solution for this?
    Igor S.

    I think I understand your problem.
    In my example I have an external data column "Beneficiary Name", using a Beneficiary external content type (accessing a table of beneficiaries in a SQL table).
    I want to set the "Beneficiary Name" property using the client object model. I know the name of the beneficiary but not the ID value.
    It is a fairly simple solution. You just need to identify the name of the property SharePoint assigns to the ID field, in my case it is called "Beneficiary_ID". Then set the two properties as follows:
    thisItem["Beneficiary_Name"] = "Charitable Trust";
    thisItem["Beneficiary_ID"] = -1;
    thisItem.Update();
    Setting the ID property to -1 causes the server to do an automatic lookup for the ID from the value assigned to the item.

  • Cannot delete Document Content Type. Getting error "Document Content Type Still in use" powershell, sharepoint 2013

    not able to delete "Document" content type from a library. I have a custom content type. I have added the custom content type to all the items of library. also, i have added the custom columns from "Document" content type to my custom
    content type. Still cannot delete the "Document" content type. I am doing the same process in different site collections and different libraries. But not able to delete in a few say- 10 in 100. Get the error - "Document content type is still
    in use"

    Hello 
    Here you go
    http://blog.octavie.nl/index.php/2012/09/14/error-the-content-type-is-in-use-explained
    https://social.technet.microsoft.com/Forums/en-US/e81020e3-2c12-4f39-a2f4-f1fd88ba6547/content-type-is-still-in-use-on-document-library
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Properties panel (for Content Types) not showing when creating sharepoint based document

    Hello,
    I've created three Content Types to populate when creating a new Budget document. The problem I'm seeing is that my pc always opens the Budget doc in Word Online and the properties box does not show. When I create a new Budget doc with my test pc, where
    it always opens in Word, the properties box does show the three Content Types.
    Is the idea of Content Type and the properties window supposed to work in Word Online?
    My pc is Win 7, Office 2010 and IE 11
    My test pc is Win 8, Office 2013 and IE 10
    Thanks

    Hi Jimbo, they don't work online. You should change your library settings to open documents in client program.
    cameron rautmann

  • How to create a sharepoint 2013 replica site of an existing sharepoint 2013 publishing site

    Hi Team,
    I have created a publishing site and used custom masterpage layouts for this site. now i want to copy this site in another site collection. How will i do that? I tried to export and then import a site template, by  creating a design package from design
    manager. but it din't work. can anyone help me out?

    hi Shravan,
    Thanks a lot for your reply. When using Design Manager package of SP2013, it is working and coping the master/layout pages. But the design of Default.aspx are gone - which were done using Content Editor Webpart. Not sure how to copy the page with content.
    BTW - Export/Import does not work, when opening the new site after import- says - something went wrong and show nothing.
    When trying to import with
    import-spweb -identity http://mysite/mysubsite  -path D:\subsitebackup\mysubsitebackup.cmp these two errors are in log file:
    [ListItem] [seattle.master]   Warning: File cannot be deleted will try to append the file instead.
    *** Inner exception:
    Cannot remove file "seattle.master". Error Code: 158.
    ListItem] [startermaster.html]   Error: This file may not be moved, deleted, renamed, or otherwise edited

  • HT201322 when I follow these directions "5. Choose a content type by clicking Music, Movies, TV shows, Apps, or Books from the top."  "Books" does not appear as an option for me.

    Trying to manage hidden Apps, Books, etc in the iCloud - I am following the directions from this post "
    HT201322: iTunes Store: Hiding and unhiding purchases"
    I do not see the "Books" option to select to manage the content, I only see Music, Movies, TV Shows and Apps
    How to I select "Books"?

    Hello eaglesrest13
    If you are having issues with connecting to the iTunes Store and certain parts of it, then check out the articles below to resolve it.
    Apple software on Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/ts4123
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    Regards,
    -Norm G.

  • Missing Columns from List Content Type

    Hi,
    I'm having some strange problems with one of my site collections, I have site content types with a few columns in it and I'm using them in 3 different libraries.
    However recently something happened and it seems the list content types in one of the libraries have stopped using some of the columns set out in the site content type (according to library settings). The columns still show as part of the list (and the metadata
    is still in there), when I've tried adding them back to the list content types, I do not see them in the list columns group, only in their original column group. If I try to add them to the list from their original group I get the errors similar to the following:
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    General 8e2s
    Medium Unknown SPRequest error occurred. More information: 0x8007054f
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    General aix9j
    High SPRequest.AddField: UserPrincipalName=, AppPrincipalName= ,bstrUrl=http://servername/sitecollection ,bstrListName={7F184ACA-48C3-4728-AF42-A12CB55941B4} ,bstrSchemaXml=<Field Type="Lookup" DisplayName="DocumentOwner"
    Required="FALSE" EnforceUniqueValues="FALSE" List="{57d71ec0-a996-4977-abf7-4cd4e0cc105c}" WebId="53a31862-077a-4031-8aad-7f2a43e33a46" ShowField="Title" UnlimitedLengthInDocumentLibrary="FALSE" Group="_QMS"
    ID="{ca4bc17d-bb96-4aee-bb96-e645c939a013}" ,grfAdd=18
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    General ai1wu
    Medium System.Runtime.InteropServices.COMException: An internal error occurred. (Exception from HRESULT: 0x8007054F), StackTrace:    at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String
    schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.AddFieldToList(SPField fldSrc)     at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.UpdateList()
        at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
        at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext
    context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer,
    IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr
    pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    General 8nca
    Medium Application error when access /_layouts/15/fldpick.aspx, Error=An internal error occurred. (Exception from HRESULT: 0x8007054F)   at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String
    bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)     at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    Runtime tkau
    Unexpected System.Runtime.InteropServices.COMException: An internal error occurred. (Exception from HRESULT: 0x8007054F)    at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl,
    String bstrListName, String bstrSchemaXml, Int32 grfAdd)     at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    11.14.2014 13:16:52.85 w3wp.exe (0x1B84)
    0x0770 SharePoint Foundation
    General ajlz0
    High Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: An internal error
    occurred. (Exception from HRESULT: 0x8007054F) ---> System.Runtime.InteropServices.COMException: An internal error occurred. (Exception from HRESULT: 0x8007054F)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl,
    String bstrListName, String bstrSchemaXml, Int32 grfAdd)     at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)     --- End of inner exception stack trace ---  
      at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)     at Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String
    schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol)     at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.AddFieldToList(SPField fldSrc)     at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.UpdateList()
        at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.HandleError(Exception
    e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
        at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    fd09cc9c-cf7b-1059-3bcb-0e44d3bf3743
    I've tried to make changes to the parent site content type, however those changes to not push down to the library in question. The missing columns have varied types (single line of text, lookup, managed metadata and so forth). All of these content types &
    site columns were created through the user interface of SharePoint.
    Can anyone help me with any ideas what has happened and/or how to fix this problem?

    Hi Hans,
    As I understand, you have custom content type in 3 libraries, while the issue occurs to the columns in this content type.
    I wonder if the issue occurs to other two libraries as well?
    From your description, "I've tried to make changes to the parent site content type, however those changes to not push down to the library in question", do you mean that changes in content type are not reflected to the list which is added to this
    content type. If that is the case, I'd suggest you recreate content type.
    If the site content type works well in other two libraries, please create a new library and add this content type. If it works well, then move the list content to this new list.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Unable to create a page content type

    Add-PSSnapin -Name Microsoft.Sharepoint.Powershell
    #$SiteURL = get-SPSite "http://srvr1:123/sites/ENGG/"
    $w = get-spweb "http://sRVR1:123/sites/ENGG/"
    $web = get-spweb "http://sRVR1:123/sites/ENGG/"
    try
    $cts =  $w.ContentTypes
    Write-Host "inside content types try block"
    $spId = new-object Microsoft.SharePoint.SPContentTypeId("0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900DCED8380ADA44ABB8411D56976A5F491")
    $spId
    $ct = new-object Microsoft.SharePoint.SPContentType($spId,$cts,"BIFPageCT")
    catch
      Write-Host "error occured in creation"
    Write-Host "going2 update web"
    $w.Update();
    #get all the ctypes from site collec
    ForEach($ctype in $w.ContentTypes)
    { #write-host $ctype.Name": "$ctype.ID
     if($ctype.Name -eq "BIFPageCT")
    {   write-host $ctype.Name": "$ctype.ID }else {  Write-Host "ctype not found" }}
     I  tried to create a  new content type in my new site collec in my portal. but it failed to  create.i have taken the content type id from my another site collc. where this content type is  successfully created!
    please help why i am getting content type not found error.

    Hi,
    We can use the following PowerShell script to create a page content type.
    $spWeb = Get-SPWeb http://sRVR1:123/sites/ENGG/
    $spWeb.AvailableContentTypes | Select Name
    $parent = $spWeb.AvailableContentTypes["Page"]
    $contentType = New-Object Microsoft.SharePoint.SPContentType -ArgumentList @($parent, $spWeb.ContentTypes, "BIFPageCT")
    $contentType.Group = "My Content Type"
    $contentType.Description = "BIF Page Content Type"
    $spWeb.ContentTypes.Add($contentType)
    $spWeb.Update()
    $spWeb.Dispose()
    Here is a blog for your reference:
    http://www.microsofttechnology.net/2012/03/how-to-create-content-type-site-column.html
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Site content types and site columns were absent

    hi,
    i have seved a  sub site as a template which includes 20+ doc libs with 20+ site content ctypes which includes  15+ site columns  and then i have used this savedsite template in one site collection and implemented my
    custom web parts and upload document fun. successfully.
    now i have created another new site collection and forgot to create site content types and site columns as  we have seen the  site columns in the saved site template already.
    now i realized that those  site content types and site columns were not there but the strange thing is that i am able to uplaod the documents  into those document libraries  which are not associated with site content types, without any error.
    Can I create  the same in my new site collection ? since i have already created  many many sub sites based on the  saved site templates tested the functionality ,i dont wanna delete the template recreate all the sites  again in order
    to save the time.
    Now pls advice:
    1) if site columns / site contents  were not existing at the site collection level, will this affect my func. in future?
    2)   is there any automated way fo creating site columns, site content types, associateing these site content types with doc libs programmatically like power shell/ sp object model API.
    3) would like to any programmatic way of creating hundreds of sub sites based on the saved site templates in myw eb application/ site collection.

    Hi,
    We can create site columns, site content types or sub-sites using SharePoint Server Object Model.
    The following articles for your reference:
    SharePoint 2010: Create Site Columns and Content Types using C#.Net
    http://social.technet.microsoft.com/wiki/contents/articles/20267.sharepoint-2010-create-site-columns-and-content-types-using-c-net.aspx
    How to: Add a Content Type to a SharePoint List
    http://msdn.microsoft.com/en-us/library/office/aa543576(v=office.14).aspx
    Create Sites Using Custom Site Templates in SharePoint 2010
    http://www.c-sharpcorner.com/UploadFile/63e78b/create-sites-using-custom-site-templates-in-sharepoint-2010/
    How to create sub site with custom site template through PowerShell
    http://fangdahai.blogspot.com/2012/08/how-to-create-sub-site-with-custom-site.html
    Best regards
    Dennis Guo
    TechNet Community Support

  • Preset default value of DropDown based on Content Type selection in the SharePoint 2010 library

    Hi,
    I have three site content types (Admin, Technical & Well) derived from base content type "Base" and added this content types to "Documents" library. I also have one site column "Category"(Dropdown) with values (Admin, Technical
    & Well) which is available in all the content types.
    Now, when i try to create a document based on "Admin" content type then "Category" value should be preset to "Admin", similarly when i select "Technical" content type then "Category" should be preset to "Technical"
    and same with "well".
    Can some one provide me how i can achieve this?
    I am working in the SharePoint 2010 environment.
    Regards,                                                                      
                                          Chakradhar

    My understanding is that , you have to display the category in all the content types.
    So in that case create a content type like
    Create a base content type -- with column category.
    Create a Admin content type based on base content type as parent. By default ,the category column is available in admin content.
    Create a Technical content type based on base content type as parent. By default ,the category column is available in Technical content type.
    Create a Well content type based on base content type as parent. By default ,the category column is available in Well content type.
    Do you want to create using sharepoint ui or code(visual studio)?

  • Add Already Existing Taxonomy Column to Content Type using visual Studio

    Hi
    I need to add existing Taxonomy Site Column to my Content type, which will be used in  my SharePoint list Everywhere I have seen it is talking about how to create managed metadata column and then add it to your site content type.My column is already
    present just I need to use it. How can I do this?
    <ContentType
    ID="0x0100b58d33764b384da58bbadee9721e1843"
    Name="MyCustomContentType"
    Group="Custom"
    Description="Custom provisioned contenttype containing a Taxonomyfield"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="8D0458C1-0FB7-4981-BEE1-52D0DF01895C" Name="MyTaxonomyField"/>
    <FieldRef ID="3a913424-fc7f-49ef-8fb6-a2ca1712cdc3" Name="MyTaxonomyFieldTaxHTField0"/>
    <FieldRef ID="f3b0adf9-c1a2-4b02-920d-943fba4b3611" Name="TaxCatchAll"/>
    <FieldRef ID="8f6b6dd8-9357-4019-8172-966fcd502ed2" Name="TaxCatchAllLabel"/>
    </FieldRefs>
    </ContentType>
    Where I can get ID of existing Site Columns as well as TaxCatchAll and TaxCatchAlllabel

    Hi,
    To get the ID of existing site columns, you can use SharePoint Manager 2010:
    Take a look at the post:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/f95fb1e9-d9a9-48e8-b99e-4262bffa8968/sharepoint-manager-2010-how-to-update-list-schema-xml
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Missing -- SQL Server Reporting content types in a site collection...

    SharePoint 2013 farm setup:
    SP server --> SharePoint 2013 farm, powerpivot working, added SSRS features under shared items in the SQL Installation on the SharePoint server.
    SQL server has all content databases.
    Perform a new Installation of SQL server 2012 on the SharePoint server.
    SQL Server Feature installation 
    Reporting services Add-in for SharePoint Products 
    Restart server 
    Open SharePoint Admin Powershell 
     Install-SPRSService
     Install-SPRSServiceProxy
     get-spserviceinstance -all |where {$_.TypeName -like "SQL Server Reporting*"} | Start-SPServiceInstance
    Create SQL Server Reporting Services Service application
    Settings -> Advanced settings -> Allow management of content types
    Site collection features: Activate Report Server Integration features
    Still the content types do not show up.

    Hi,
    We can do as follows:
    1. Please try to deactivate and re-active the “Report Server Integration Feature” (E8389EC7-70FD-4179-A1C4-6FCB434) for your site collection feature via PowerShell or the GUI.
    2. Here is a blog about the similar issue for you to check it.
    http://chrishattonnzlsp.wordpress.com/2013/01/17/missing-report-server-content-types-rssharepoint-add-in-sharepoint-2013/
    3. IISRESET
    Best Regards
    Dennis Guo
    TechNet Community Support

  • [CSOM] How to use CSOM to add a Enterprise Keywords column to a content type

    Based on information given in following blogs, 
    http://sadomovalex.blogspot.com/2011/05/add-enterprise-keywords-field-into.html
    I wrote this code to Add an Enterprise Keywords column to a SharePoint content type. the  code runs fine... but when I go to the content type definition in the UI I don't see any column other than title.
    ContentTypeCreationInformation contentType = new ContentTypeCreationInformation();
    contentType.Name = "MyCT";
    contentType.Group = "MyGroup";
    contentType.ParentContentType = itemCt;
    ct = web.ContentTypes.Add(contentType);
    web.Update();
    c.ExecuteQuery();
    Field f1;
    Field f2;
    FieldCollection collFields = web.Fields;
    var siteColumns = c.LoadQuery(collFields);
    c.ExecuteQuery();
    foreach (var col in siteColumns) {
    if (col != null) {
    if (col.Title.Equals("TaxKeywordTaxHTField")) {
    f1 = col;
    if (col.Title.Equals("Tax Catch All Column")) {
    f2 = col;
    FieldLinkCreationInformation fieldLink = new FieldLinkCreationInformation();
    fieldLink.Field = f1;
    myContentType.FieldLinks.Add(fieldLink);
    f1.Update();
    FieldLinkCreationInformation fieldLink2 = new FieldLinkCreationInformation();
    fieldLink2.Field = f2;
    myContentType.FieldLinks.Add(fieldLink2);
    f2.Update();
    web.Update();
    c.ExecuteQuery();
    But when I go into SharePoint UI and try to see the content of my new content type. it only has a title column. there is no Enterprise Keyword column.
    How can I add a enterprise keyword column?
    val it: unit=()

    Hi,
    For this issue, I'm trying to involve someone familiar with this topic to further look at it.
    Thanks,
    Qiao
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Qiao Wei
    TechNet Community Support

  • Use CSOM to create a Site column of type "enterprise keyword"

    I have successfully created site columns using CSOM.
    When I look at the available types of site columns I can see
    http://office.microsoft.com/en-us/sharepoint-server-help/site-column-types-and-options-HA010302196.aspx
    But there is nothing similar to what you can do when you go into list settings and say "Add an enterprise keywords column and enable keyword synchronization"
    What is the data type for the enterprise keywords column? why should it be directly added into the list via the UI... but not via a site column?
    val it: unit=()

    Hi,
    The following code(Client Object Model) for your reference:
    static void Main(string[] args)
    string siteURL = "http://siteurl";
    ClientContext context = new ClientContext(siteURL);
    //specific user
    NetworkCredential credentials = new NetworkCredential("username", "password", "domain");
    context.Credentials = credentials;
    FieldCollection fields = context.Web.Fields;
    Field field = fields.GetByTitle("Enterprise Keywords");
    context.Load(field);
    context.ExecuteQuery();
    //field schema xml
    string fieldSchema=field.SchemaXml;
    //update the schema of Enterprise Keywords field
    XmlDocument xmlDoc = new XmlDocument();
    xmlDoc.LoadXml(fieldSchema);
    XmlNode node=xmlDoc.SelectSingleNode("Field");
    XmlElement Xe = (XmlElement)node;
    Guid fieldID = Guid.NewGuid();
    Xe.SetAttribute("DisplayName", "Enterprise Keywords1");
    Xe.SetAttribute("StaticName", "TaxKeyword1");
    Xe.SetAttribute("Name", "TaxKeyword1");
    Xe.SetAttribute("ID", "{" + fieldID + "}");
    fieldSchema = xmlDoc.InnerXml;
    //add this field to the field collection
    fields.AddFieldAsXml(fieldSchema, false, AddFieldOptions.DefaultValue);
    context.ExecuteQuery();
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

Maybe you are looking for

  • What is the difference between a full and a upgrade version?

    When I want to buy photoshop elements 8.0 i can select a full or upgrade version, the price is alsmost thesame. normally you would think a upgrade is just a upgrade and you can't use it if you don't already have photoshop Elements installed. but in m

  • Make Audit Reports in OIM 9.1.0.1

    Hello Gurus, I need to put in my report the pcq_question from table pcq, but this information was encrypted. How can i make visible this information? I need this in my audit report!!! Thank you very much, Thiago Leôncio

  • Can I use an external cd/dvd drive on my iMac?

    I have a 5 year old iMac (2GHz Intel Core 2 Duo, 3 GB 667 MHz DDR2 SDRAM) running OSX 10.4.11. We purchased Snow Leopard to upgrade only to find out our cd/dvd drive is broken. It would be about $150 to replace and we're looking to see if we could bu

  • Slow mac book pro after upgrade

    Hi, I recently updated my macbook pro to Yosemite and ever since it has become very slow. I ran Etrecheck and the results are below. Not exactly sure what to do next. Any help would be much appreciated thanks EtreCheck version: 2.1.8 (121) Report gen

  • Story Plus CC desktop app won't install on MacBook Pro

    I have a subscription to Adobe CC Complete. I can use Story CC online but need offline access desperately for when I'm traveling, which is ALL the time. First it said I needed Adobe Air but wouldn't let that install through the Story online install p