What are the new SharePoint 2013 names for these Field Types

Puneeth, C 81 Reputation points
2022-06-20T07:13:32.317+00:00

I am trying to migrate a site from a legacy SP to 2013 SP and then to 2019. I am in the process of writing script to re-create SiteColumns programmatically. Turns out there are a few Sitecolumns whose field types are very old and are no longer available in the new versions of SharePoint. So, I am trying to know the new names for the same. All the names mentioned here are obtained by using Field.TypeAsString get method.

  1. TaxonomyFieldTypeMulti
  2. RatingCount
  3. Image
  4. SummaryLinks
  5. PublishingScheduleStartDateFieldType
  6. ExemptField
  7. CallTo
  8. HTML
  9. PublishingScheduleEndDateFieldType
  10. LayoutVariationsField
  11. TargetTo
  12. ContactInfo
  13. AverageRating
  14. ContentTypeIdFieldType
  15. Whereabout
  16. Overbook
  17. List item

I looked into MS Docs but couldn't find any reference for these. Thanks for the help in advance.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Emily Du-MSFT 41,786 Reputation points Microsoft Vendor
    2022-06-21T08:44:58.05+00:00

    @Puneeth, C

    Here are some information for your reference:

    1. TaxonomyFieldTypeMulti : Managed Metadata with multiple values
    2. RatingCount : Number of Ratings
    3. Image : Hyperlink or Picture
    4. SummaryLinks : Summary Links
    5. PublishingScheduleStartDateFieldType : Publishing Schedule Start Date
    6. ExemptField : Single line of text
    7. CallTo : Person or Group
    8. HTML : Publishing HTML
    9. PublishingScheduleEndDateFieldType : Publishing Schedule End Date
    10. LayoutVariationsField : Publishing HTML
    11. TargetTo : Audience Targeting
    12. ContactInfo : Multiple lines of text
    13. AverageRating : Rating (0-5)
    14. ContentTypeIdFieldType : Single line of text
    15. Whereabout : Multiple lines of text
    16. Overbook : Yes/No
    17. List item : Item

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Puneeth, C 81 Reputation points
    2022-06-22T07:09:45.097+00:00

    @Emily Du-MSFT Writing this as an answer as my reply to the comment is not getting submitted.
    Replying to your previous comment,

    How to do the same in c# though? Here's what I have so far.

    public static List<SPField> GetSiteColumns(string source)  
            {  
                List<SPField> siteColumnsList = new List<SPField>();  
                using (SPSite site = new SPSite(source))  
                {  
                    using (SPWeb web = site.OpenWeb())  
                    {  
                        foreach (SPField siteColumn in web.Fields)  
                        {  
                            Console.WriteLine("sitecolum name: " + siteColumn.Title + " sitecolumn type:" + siteColumn.Type);  
                            Console.WriteLine("\n");  
                            siteColumnsList.Add(siteColumn);  
                        }  
                    }  
                }  
                return siteColumnsList;  
            }  
      
    public static void AddSiteColumn(string destination, SPField column)  
            {  
                using (SPSite site = new SPSite(destination))  
                {  
                    using (SPWeb web = site.OpenWeb())  
                    {  
                        try  
                        {  
                            web.AllowUnsafeUpdates = true;  
                            web.Fields.Add(column.Title, column.Type, column.Required);  
                            web.Update();  
                            web.AllowUnsafeUpdates = false;  
                        }  
                        catch (Exception e)  
                        {  
                            Console.WriteLine(e.Message);  
                        }  
                   }  
              }  
    }  
    
    0 comments No comments

  3. RaytheonXie_MSFT 31,071 Reputation points Microsoft Vendor
    2022-06-29T09:27:52.66+00:00

    Hi @Puneeth, C ,
    I will recommend you to use CSOM to create a Manage Metadata column. Please refer to following code.

    if (field.TypeAsString == "TaxonomyFieldType")  
    {  
        Guid termStoreId =  Guid.Empty;  
        Guid termSetId = Guid.Empty;  
      
        GetTaxonomyFieldInfo(srcContext, out termStoreId, out termSetId);    
      
        string fieldSchema = "<Field Type='" + field.FieldTypeKind + "' DisplayName='" + field.Title + "' Name='" + field.InternalName + "' Hidden='" + field.Hidden + "'/>";  
        targetcollField.AddFieldAsXml(fieldSchema, true, AddFieldOptions.AddToDefaultContentType);  
        targetContext.Load(targetcollField);  
        srcFieldCollections.Add(field);  
      
        TaxonomyField taxonomyField = srcContext.CastTo<TaxonomyField>(field);  
        taxonomyField.SspId = termStoreId;  
        taxonomyField.TermSetId = termSetId;  
        taxonomyField.TargetTemplate = String.Empty;  
        taxonomyField.AnchorId = Guid.Empty;  
        taxonomyField.Update();  
        srcContext.ExecuteQuery();  
      
    }  
      
      
    private void GetTaxonomyFieldInfo(ClientContext clientContext, out Guid termStoreId, out Guid termSetId)  
    {  
        termStoreId = Guid.Empty;  
        termSetId = Guid.Empty;  
      
        TaxonomySession session = TaxonomySession.GetTaxonomySession(clientContext);  
        TermStore termStore = session.GetDefaultSiteCollectionTermStore();  
      
        TermSetCollection termSets = termStore.GetTermSetsByName("ABC", 1033);  
      
        clientContext.Load(termSets, tsc => tsc.Include(ts => ts.Id));  
        clientContext.Load(termStore, ts => ts.Id);  
        clientContext.ExecuteQuery();  
      
        termStoreId = termStore.Id;  
        termSetId = termSets.FirstOrDefault().Id;  
    }