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

Similar Messages

  • How to delete a custom columns from a content-type in Sharepoint Client object model

    I have a windows interface where I create a content-type and then create a column and adds that column to the content-type.
    //availableCT is my content-type where the column is present.
    //get all available fields within this content-type
    FieldCollection fieldColl = availableCT.Fields;
    clientContext.Load(fieldColl);
    clientContext.ExecuteQuery();
    foreach (Field field in fieldColl)
    //columnFromList is the column that is to be deleted
    if (field.InternalName.Equals(columnFromList))
    field.DeleteObject();
    clientContext.ExecuteQuery(); // this throws an exception
    // Additional information: Site columns which are included in content types or on lists cannot be deleted. Please remove all instances of this site column prior to deleting it.

    hi,
    you can use the below code to delete it
    using (ClientContext sourceContext = new ClientContext(cmdSpoSite))
    Web web = sourceContext.Web;
    sourceContext.Load(web);
    sourceContext.Load(web.AvailableContentTypes, type => type.Include(c => c.FieldLinks, c => c.Name));
    sourceContext.ExecuteQuery();
    List<ContentType> ExistingContentType = web.AvailableContentTypes.ToList();
    IEnumerable<ContentType> contentTypesList = ExistingContentType.Where(ct => ct.Name == "<ContentTypeName>");
    ContentType ctype = contentTypesList.ElementAt(0);
    IQueryable<FieldLink> flinks = ctype.FieldLinks.Where(f => f.Name == "<FiledName");
    foreach (FieldLink flink in flinks)
    flink.DeleteObject();
    ctype.Update(true);
    sourceContext.ExecuteQuery();
    The difference being in your code and above code is you are removeing fileds which is eventually is deleting site column but a site column cannot be deleted if is alreday being used. So you need to deled the FieldLink in content type taht way column is removed
    from content type but not from site column.
    Now if you want to delete site column you can use your code to deleted Field.
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • List content type columns don't show new names after resource files were changed

    Hello,
    we ran into a problem, that we're not able to figure out at the moment.
    We have a site collection with site columns and site content types defined and created with
    features ant their XML files. All display names are retrieved from resource files. We do have
    several subsites, that have predefined lists also created from features and their corresponding
    XML files. They use inherited versions of these site content types as list content types with
    their columns inherited from the site columns.
    We had some changes within the resource files and never ran into a problem up to now.
    We changed the display names of some of these columns within the resource files. After
    these changes the site columns, site content types and list columns show the changes
    as planned. Unfortunately the columns of the list content types do not display the changes.
    They still show the old name. If you try to alter the old names manually the new name is
    shown within the form, but you're not able to save it and the list content type columns
    still have their old name afterwards.
    We checked our definition files and they seemed to be well.
    Any ideas?
    Regards,
    Markus
    List columns as defined within new the resource file:
    List content type columns, that do not show the changes from the new resource file:

    Hi,
    According to your post, my understanding is that you want to modify the site column name in the list.
    I try to reproduce the issue, however, everything works well.
    You can modify the DisplayName in the Element.xml file.
    Then after you redeploy the project, the site column name will be changed in the list setting page.
    In addition, please check whether you create the list correctly.
    For more information, you can refer to
    Walkthrough: Create a Site Column, Content Type, and List for SharePoint
    Thanks,
    Linda Li                
    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]
    Linda Li
    TechNet Community Support

  • Search for documents using External Data on list content type

    hi,
    say we have clients in an external database, we create the external content type for use in sharepoint 2013
    we create two content types, Quote and Order for use in a library
    we create a document library that uses the above content types
    we then add a column for the external data ( in this case Client Name- but also include ID) , we have the option to copy to content type selected. so now library shows 'Client' and 'Client:ID'
    I believe that column gets added to  list content types based on the 2 document content types.
    so we have list items , which have a document , a content type and a piece of data from the external LOB system.
    now that is fine, works great, however, how do you configure the content search web part to return documents based on the piece of external data - ie client:ID ? or Client Name ?
    I can map the client:ID to one of the Int00 managed properties and crawl etc - but do not see a way to use that to return documents
    any help would be appreciated :)
    thanks
    MrP

    Create a scopr with that in managed properies and then u can get results from  external sources

  • Workflow Status column for new content type

    Hi,
    Initially I had a document library and several workflows associated with it. After that I created a new content type inheriting Folder content type. My existing workflows could be started and work fine with any item of this new content type except anything
    related to the workflow status column, such as "Automatically update workflow status to the current stage name", or workflow action "Set workflow status". If I use the OOTB Folder content type, everything's fine. But I need custom fields
    for folder as well.
    The workflows can be started then it seems unreasonable that they are not associated with the items of the new content type, considering I set my new content type to be the child of the existing Folder content type. So why any item under this new content
    type does not have the workflow status column? I've tried removing the workflow from the list and publishing back using SPD without success.
    I also notice that when you associate a new content type to a document library/list which has some custom columns, you cannot edit those columns to be used in the new content type. You need to delete those columns and recreate them, then the option "Add
    to all content types" is there. Is this expected design?
    Thanks

    Hi,
    According to your post, an error occurred when you created a custom Edit form for new content type.
    We can do as follows:
    1.Add the MyNameSpace.MyNewEditPage dll file into GAC(C:\Windows\assembly).
    2. Execute the iisreset command.
    We can create a new content type using visual studio 2012/2013.
    http://www.sharepoint-journey.com/sharepoint-list-content-types-and-site-columns.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • 2013 Workflows - Trigger a workflow from a Content Type

    So now that a workflow cannot be triggered from a Content Type, how are people doing this now? 
    Any suggestions appreciated.
    Thanks
    J Sykes

    Hi,
    According to your description, my understanding is that you want to trigger a workflow from a Content Type.
    As we all know, we can attach a workflow to a Content Type, but the workflow cannot run until the Content Type is added to a list or library.
    The elements of a list content type include the columns of metadata that are associated with the content type and workflows that can run on items of that content type.
    More information about the content type and workflow are provided in the link below:
    http://technet.microsoft.com/en-us/library/cc262735.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Orphaned column in a content type

    Hi,
    We have MMS and Content Type Hub created.
    Initially we created a column and added it to a couple of content types in the Content Type Hub and published the content types.
    Recently we deleted the column from one particular content type and republished the content type, but still we see the column in the content type in the subscribing site collections New and Old.
    Have manually run the jobs "Content Type Hub" and "Content Type Subscriber"

    Hi,
    According to your post, my understanding is that the content type in the subscribing site collections don’t update immediately.
    I recommend that you can try to check and test the things as below:
      1.  Go to “SharePoint 2013 Central Administration”, click on the “Application Management”, click on the “Manage Service Application”, select “Managed Metadata Service Application”, check the Managed metadata service connection properties to make
    sure that the option “Consumes content types from Content Type gallery at <your correct Content Type Hub URL>” and “Push-down Content Type Publishing updates from the Content Type Gallery to sub-sites and lists using the content type” is enabled.
      2.  Go to “Site Settings”, click on the “Site content types”, select the particular content type, click on the “Manage publishing for this content type”, check the “Unpublish” button and click on the “OK” button, then you need to publish it again.
      3.  Go to “Site Settings”, click on the “Content Type Publishing” to check the “Refresh all published content types on next update” and the “the Content Type Publishing error log”.
      4.  Go to “Monitoring” in the “SharePoint 2013 Central Administration”, click on the “Review job definitions”, find the
    “Content Type Hub” and “Content Type Subscriber” timer jobs to run again, and check if the two timer job’s status is succeeded.
    For more information, you can refer to:
    http://blog.morg.nl/2011/11/content-type-hub-not-working-possible-causes/
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/248fcf93-5ebe-4404-8b7d-f1f32d0046e3/content-type-hub-syndication-and-publishing-works-but-not-for-already-applied-content-types?forum=sharepointgeneral
    https://support.office.com/en-US/Article/Publish-a-content-type-from-a-content-publishing-hub-58081155-118d-4e7a-9cc5-d43b5dbb7d02?ui=en-US&rs=en-US&ad=US
    http://sharepoint-community.net/profiles/blogs/understanding-content-type-hub-cth-in-sharepoint-2013
    Best Regards,
    Yumi Fu

  • Deploying a Reusable Workflow to a List Content Type using PowerShell

    We have a situation where deployment of a reusable workflow for a site content type cannot be completed through the web interface due to the number of libraries where the content type is in use (time-out on deploy and update).
    It was hoped that this could be accomplished with PowerShell but the method of deploying to a list content type appears to be different than it is to a list (all content types).
    The below snippet works fine for a list / all content types:
    function AddWorkflowToLibraries ($SiteCollection, $ctName, $WfName, $WfAssociationName)
    $site = Get-SPSite $SiteCollection
    [Guid]$wfTemplateId = New-Object Guid
    #Step through each web in site collection
    $site | Get-SPWeb -limit all | ForEach-Object {
    $web = $_
    $_.Lists | ForEach-Object{
    if($_.AllowContentTypes -eq $true)
    if($_.ContentTypes.Item("$ctName") -ne $null)
    write-host "Enabling workflow on" $_.Title "in" $_.ParentWebUrl
    $ct = $_.ContentTypes[$ctName]
    $culture = New-Object System.Globalization.CultureInfo("en-US")
    $template = $site.RootWeb.WorkflowTemplates.GetTemplateByName($WfName, $culture)
    if($template -ne $null)
    $tasklist = "Tasks"
    $historylist = "Workflow History"
    if(!$web.Lists[$historylist])
    $web.Lists.Add($historylist, "A system library used to store workflow history information that is created in this site. It is created by the Publishing feature.",
    "WorkflowHistory", "00BFEA71-4EA5-48D4-A4AD-305CF7030140", 140, "100")
    if (!$web.Features["00BFEA71-4EA5-48D4-A4AD-305CF7030140"]) {
    Enable-SPFeature -Identity WorkflowHistoryList -Url $web.Url
    $wfHistory = $web.Lists[$historylist]
    $wfHistory.Hidden = $true
    $wfHistory.Update()
    if(!$web.Lists[$tasklist])
    $web.Lists.Add($tasklist, "This system library was created by the Publishing feature to store workflow tasks that are created in this site.", "WorkflowTasks", "00BFEA71-A83E-497E-9BA0-7A5C597D0107", 107, "100")
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.AddWorkflowAssociation($association)
    $_.Update()
    else
    Write-Error "Workflow Template not found"
    AddWorkflowToLibraries <Site Name> <Content Type Name> <Workflow Template Name> <Association Name>
    However changing the association as follows causes the script to still execute without a problem but the workflow doesn't appear for the content and the associations collection is empty:
    function AddWorkflowToLibraries ($SiteCollection, $ctName, $WfName, $WfAssociationName)
    $site = Get-SPSite $SiteCollection
    [Guid]$wfTemplateId = New-Object Guid
    #Step through each web in site collection
    $site | Get-SPWeb -limit all | ForEach-Object {
    $web = $_
    $_.Lists | ForEach-Object{
    if($_.AllowContentTypes -eq $true)
    if($_.ContentTypes.Item("$ctName") -ne $null)
    write-host "Enabling workflow on" $_.Title "in" $_.ParentWebUrl
    $ct = $_.ContentTypes[$ctName]
    $culture = New-Object System.Globalization.CultureInfo("en-US")
    $template = $site.RootWeb.WorkflowTemplates.GetTemplateByName($WfName, $culture)
    if($template -ne $null)
    $tasklist = "Tasks"
    $historylist = "Workflow History"
    if(!$web.Lists[$historylist])
    $web.Lists.Add($historylist, "A system library used to store workflow history information that is created in this site. It is created by the Publishing feature.",
    "WorkflowHistory", "00BFEA71-4EA5-48D4-A4AD-305CF7030140", 140, "100")
    if (!$web.Features["00BFEA71-4EA5-48D4-A4AD-305CF7030140"]) {
    Enable-SPFeature -Identity WorkflowHistoryList -Url $web.Url
    $wfHistory = $web.Lists[$historylist]
    $wfHistory.Hidden = $true
    $wfHistory.Update()
    if(!$web.Lists[$tasklist])
    $web.Lists.Add($tasklist, "This system library was created by the Publishing feature to store workflow tasks that are created in this site.", "WorkflowTasks", "00BFEA71-A83E-497E-9BA0-7A5C597D0107", 107, "100")
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.ContentTypes[$ctname].AddWorkflowAssociation($association)
    $_.ContentTypes[$ctname].Update()
    else
    Write-Error "Workflow Template not found"
    AddWorkflowToLibraries <Site Name> <Content Type Name> <Workflow Template Name> <Association Name>
    The only change is:
    $association = [Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($template, $wfName, $web.Lists[$tasklist], $web.Lists[$historylist])
    $association.AllowManual = $true
    $_.ContentTypes[$ctname].AddWorkflowAssociation($association)
    $_.ContentTypes[$ctname].Update()
    But unlike the list version, the association doesn't appear to be saved and no error is generated.
    Is anyone aware of what may cause this or have an example in C# that may explain something my script is missing?

    Hi Garry,
    After you associate the workflow to the content type, you should update the update the content type using
    $ct.UpdateWorkflowAssociationsOnChildren($true,$true,$true,$false)
     method.
    Here is the completed script:
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $site=Get-SPSite "http://serverName"
    $web=$site.OpenWeb()
    $list=$web.Lists["ListC"]
    $taskList=$web.Lists["Tasks"]
    $historyList=$web.Lists["Workflow History"]
    $ct=$list.ContentTypes["Link"]
    $culture=New-Object System.Globalization.CultureInfo("en-US")
    $wfTemplate=$web.WorkflowTemplates.GetTemplateByName("Three-State",$culture)
    $associationWF=[Microsoft.SharePoint.Workflow.SPWorkflowAssociation]::CreateListContentTypeAssociation($wfTemplate, "myThreeStateWF",$taskList,$historyList)
    $ct.WorkflowAssociations.Add($associationWF)
    $ct.UpdateWorkflowAssociationsOnChildren($true,$true,$true,$false)
    Here is a demo about how to update it using C#
    http://www.thorntontechnical.com/tech/sharepoint/sharepoint-2010-associate-workflow-to-content-type-in-a-feature
    Wayne Fan
    TechNet Community Support

  • Customising a SharePoint list content type form - "Manage multiple list items with this form"

    I have designed a form for a content type on an existing SharePoint list.  When I ran the initial wizard, I selected
    Manage multiple list items with this form which is great, exactly what I want.
    But, there are some columns in this content type that I do not want repeating and have them moved them outside of the Repeating Section but I am getting the below error.  I can't seem to find a way to create a new non-repeating group though.  Any
    advice on how to do this?

    *Bump*

  • Can't change column order from document content type

    Hi,
    I noticed a strange error in our SharePoint 2010 environment:
    We are using a SharePoint 2010 Enterprise Edition which was migrated from a MOSS 2007 Enterprise Edition with one central document library.
    In this library are several content types plus the given document content type which was already there.
    When I try to edit the column order in the document content type settings the following error occurs:
    Server Error in '/' Application.
    Object reference not set to an instance of an object.
    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and
    where it originated in the code.
    Exception Details:
    System.NullReferenceException: Object reference not set to an instance of an object.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location
    of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [NullReferenceException: Object reference not set to an instance of an object.]
    Microsoft.SharePoint.ApplicationPages.ChangeFieldOrderPage.OnLoad(EventArgs e) +376
    System.Web.UI.Control.LoadRecursive() +65
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427
    This error only occurs with the document content type. Furthermore I am not able to reproduce this error on other libraries except when
    I am using a template from this library.
    I tried to delete this content type but every time an error occurs which is saying that the content type is still in use. I checked the entire library and all informations from the SharePoint Manager 2010 Tool but the content type is definitely no longer in
    use.
    I appreciate every little bit of help regarding this problem.
    PS:
     There is also another error concerning every content type in this library: I can’t create a new or use the standard Microsoft document information panel template because every time I try to there also occurs an error which
    states out a NullReferenceException regarding the metadata of this library. But that is another story which is next on my to-do list. First I would like to solve the first error concerning the column order.
    Thanks and regards,
    Thomas K.

    Hi TKellner,
    Thanks for your post.
    1.      
    Please try to use the code below to check whether the Content Type is in used.
    http://www.learningsharepoint.com/forum/sharepoint-2007-programming/check-where-the-content-type-is-used-in-sharepoint-site/
    2.      
    Can you open the Document Library in SharePoint Designer 2010? Also, can you open the template file correctly?
    Share the result.

  • Is it possible to see list history (e.g: which user removed column from list)

    Hello there,
    I know it is possible to see version history of items and pages, but what about the lists itself?
    For example:
    Is it possible to see which user added/removed a column from a list?
    Is it possible to see which user changed a certain view from a list?
    Thanks in advance!

    There's an auditing event fired when a user modifies content types or columns in a list. To make use of this you'll need to enable auditing if it's not already enabled.
    I'm not sure about the view and I'm having trouble trying to find information about it because most of the documentation talks about VIEWing the audit reports. :)
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • Application Error while activating the feature - for creating list content type, list definition and list instance

    Dear all,
    I am getting application error while enabling the feature. if any body can point out the issue - that will be helpful.
    content type
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Type="Note" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" Group="Training Site Columns"/>
    <!-- Parent ContentType: Item (0x01) -->
    <ContentType ID="0x0100d57ecc53fde34177b096abd0ec90a8f9"
    Name="TrainingCourses"
    Group="Training Content Types"
    Description="Defines a Course"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Name="CourseDesc" DisplayName="Course Description" Required="TRUE"/>
    </FieldRefs>
    </ContentType>
    </Elements>
    List definition
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List Definition project item, an error will occur when the project is run. -->
    <ListTemplate
    Name="TrainingCourses"
    Type="10100"
    BaseType="0"
    OnQuickLaunch="TRUE"
    SecurityBits="11"
    Sequence="410"
    DisplayName="TrainingCourses"
    Description="Training Courses List Definition"
    Image="/_layouts/images/itgen.png"/>
    </Elements>
    List instance
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <ListInstance Title="TrainingCourses"
    OnQuickLaunch="TRUE"
    TemplateType="10100"
    Url="Lists/TrainingCourses"
    Description="Training Course List Instance">
    </ListInstance>
    </Elements>
    schema
    <?xml version="1.0" encoding="utf-8"?>
    <List xmlns:ows="Microsoft SharePoint" Title="TrainingCourses" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/TrainingCourses-LD_TrainingCourses" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
    <MetaData>
    <ContentTypes>
    <ContentType ID="0x0100d57ecc53fde34177b096abd0ec90a8f9" Name="TrainingCourses" Group="Training Content Types" Description="Defines a Course" Inherits="TRUE" Version="0">
    <FieldRefs>
    <FieldRef ID="{4C1B0A21-FCE0-4CFE-8742-A250672AFE4F}" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" />
    </FieldRefs>
    </ContentType>
    </ContentTypes>
    <Fields>
    <Field ID="{4c1b0a21-fce0-4cfe-8742-a250672afe4f}" Type="Note" Name="CourseDesc" DisplayName="Course Description" Required="TRUE" Group="Training Site Columns" />
    </Fields>
    <Views>
    <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>
    <FieldRef Name="LinkTitleNoMenu">
    </FieldRef>
    <FieldRef Name="CourseDesc">
    </FieldRef>
    </ViewFields>
    <Query>
    <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE">
    </FieldRef>
    </OrderBy>
    </Query>
    <ParameterBindings>
    <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
    </ParameterBindings>
    </View>
    <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>
    <FieldRef Name="Attachments">
    </FieldRef>
    <FieldRef Name="LinkTitle">
    </FieldRef>
    <FieldRef Name="CourseDesc">
    </FieldRef>
    </ViewFields>
    <Query>
    <OrderBy>
    <FieldRef Name="ID">
    </FieldRef>
    </OrderBy>
    </Query>
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
    </View>
    </Views>
    <Forms>
    <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    </Forms>
    </MetaData>
    </List>
    I am applying the feature to SPWeb level.
    cheers
    Sathya

    redeployed a new solution; since I was getting this error. I would have done typo errors etc.
    https://naveengopisetty.wordpress.com/2011/09/10/error-occurred-in-deployment-step-activate-features-invalid-file-name-the-file-name-you-specified-could-not-be-used-it-may-be-the-name-of-an-existing-file-or-directory-or-you-may-not-have-pe/
    Cheers
    Sathya

  • Not able to crawl all items from External content type

    Hello All,
    "All the records in my external content source are not getting crawled, only 1/3 rd of the data are getting crawled."
    Steps:
    I created "External content type" using sharepoint designer which connects to a SQL Server database.
    Have written a SQL View joining 2 tables, which return 9,00,000 rows when executed using the SQL Server management studio.
    I used the default "Business Data Connectivity Service" and "Search Service Application" and made sure the necessary permissions are set.
    Created a External Content source for the search service application and selected the "Business Data Connectivity Service" -> "Crawl selected External datasource" -> <my external datasource i created in sharepoint designer>
    Issue
    When i ran the full crawl for the first time it crawled "3,49,923" records in 01 hour and 07 seconds. And returned 1 error "Error crawling LOB Contents.(Error caused by exception: System.InvalidOperationException. There is an error in XML
    document...)
    Later i removed the below item from the index and started a full recrawl, this time it crawled "3,49,924" records 1 record extra from my previous crawl
    and no errors were returned.
    Please let me know what could be the issue. It doesn't look like the permission related issues as i am able to crawl the 1/3rd of my total data. Also i am able to search the crawled data. I also set the throtteling limit for the "Business data catalog"
    to -maximum 10000000 -default 1000000 which is less than the data it has to crawl.
    SRIRAM

    Hi ,
    I started the change suggested in the link shared by you, but got stuck at a point,
    The field which i set as identifier in BCS earlier is not having unique values. Total rows returned by the sql view is 899000, but the unique values present in the column that is set as identifier is
    3,49,923, which is equal to the number of rows crawled. - Is this the reason why it didnt crawl all records?
    The table that is used in the sql view has composite key, - Is it possible to have multiple identifier in BCS as well?
    Is it possible to make BCS to ignore the identifier? i mean creating BCS without an identifier column?
    Please let me know your suggestions on this.
    Thanks,
    SRIRAM
    Yes, BCS needs a UID. This is so it can figure out changes over time to a single record. Otherwise all changes to a row could be a potential new row without BCS knowing any better.
    Yes, or just have it run off the composite key instead of the field you're using now.
    Nope, BCS needs a UID field like in answer 1 :)
    Good luck!
    My CodePlex -
    My Blog - My Twitter
    Join me at the San Francisco SharePoint User Group!
    If this post helped you or answered your question please remember to mark it! :)

  • Deleting sharepoint list content type Fields

    Hi
    Please tell me the code for deleting all the fields inside content type fields..This is my code i used,but its not deleting the fields.
     SPSite spsite = new SPSite("http://ghfjhhk18:8001");
                SPWeb web = spsite.OpenWeb();
                web.AllowUnsafeUpdates = true;
                SPList list = web.Lists["Test"];
                SPContentTypeCollection cts = list.ContentTypes;
                SPContentType ct = cts["Item"];
               // ct.FieldLinks.Delete("Expires");
                //ct.Update();
                SPFieldCollection contentTypeFieldCollection = ct.Fields;
                foreach (SPField spField in contentTypeFieldCollection)
                    if (ct.Fields.ContainsField(spField.Title))
                        //SPFieldLink fieldLink = new SPFieldLink(spField);
                        ct.FieldLinks.Delete(spField.Title);
                    //myContentType = null;
                ct.Update();
                web.AllowUnsafeUpdates = false;
            }but this code is not deleting the fields..
    pls help me as soon as possible.
    One friend told me to do for loop in reverse..but how can i accomplish that

    Hi,
    Please refer the below code snippet which may help you to fix your issue. If not please refer the below links also
    http://ptsharepoint2010.blogspot.in/2011/12/programmatically-remove-fields-from.html
    http://www.c-sharpcorner.com/uploadfile/54db21/delete-field-content-type-in-sharepoint-2010-programmaticall/
    using (SPWeb web = site.OpenWeb())
    SPList spList = web.Lists["<ListName>"];
    SPContentTypeCollection spCTS = spList.ContentTypes;
    SPContentType spCT = spCTS["YourContentType"];
    spCT.FieldLinks.Delete("YourField");
    spCT.Update();
    If its not helping you, please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to programmatically create a site column and a content type

    Hello,
    I'd like to create a site column (let's say a field text) and a content type, only  using c#  -i.e. I don't want to add new item/column and then xml. This code will be added to a FeatureActivated.My code is :
    public override void FeatureActivated(SPFeatureReceiverProperties properties) {SPWeb rootweb = (SPWeb) properties.Feature.Parent;
    SPFieldText field = new SPFieldText(SPfiledscollection???, "field1");
    if (field != null)
    rootweb.Fields.Add(field)
    rootweb.Update();
    }   SPContentType newContentType = new SPContentType(spcntenttypeId??, SPContentTypeCollection ??, "content1");
       rootweb.ContentTypes.Add(newContentType);
       rootweb.Update();
    Are there any sample codes out there? I've only found samples using xml - which has an irritating "feature"
    Thank you
    Christos

    Nice code and it helped me understand. Some small questions. I'm trying to make all the "data" for a (sub)web site.
    So, I think, my steps are:
    1. create site columns+content type
    2. create  list
    3. create a lookup site column that uses the list on <2>
    4. create content type that uses the site column on <3>
    5. Create the list for the content type on <4>
    My confusion is: should I use one feature for everything? Your code is using scope=site, so i need to "hardcode" the web site's name. I don't mind doing that , I just don't know how to use scopes in features for creating data.
    Thank you
    Christos

Maybe you are looking for

  • How do i move my itouch stuff to a 2nd hand (sister's) computer that already has an itouch registered on it

    Please help! In our house we have all move around with PC's and laptops now my husband and kids have to go back to they original one to get all the stuff in ITunes how do I move there I Pod Touch stuff to a 2nd hand (sister's/mum's) computer that alr

  • ADF BC 11 - best practice question

    Hi, I think that many developers/architects working with development in the SOA area, are facing the same problem as we have. The SOA architecture promis you decoupled systems that are highly adaptable and flexible. However most systems also have use

  • My SRW2048 needs to be exercised.

    I manage a network that consists of three buildings with fiber running between each building. In the main building, I have a hub with 3 Linksys SRW2048 48-port switches and a secondary hub with 2 SRW2048's. The other two buildings each have one SRW20

  • Verizon does not care one bit about the 5% heavy user base, They want you GONE!

    In making several calls and asking pretty much the same questions to different people at Verizon Customer Service, I have come to a few surprising conclusions (well sorry, not surprising). 1.)  An opperator pretty much told me they do have informatio

  • Zen Micro . . a few quer

    Hello all, I'm glad to have found the forum. I've been reading through pages and pages . . . my eyes are pretty sore, but most of my issues are resolved, except a few (which I probably overlooked the solutions)By the way, I own a red zen micro, purch