In SharePoint Online, using C#, how do I retrieve a multiline textfield with append text?

Merrill, Travis Neil 21 Reputation points
2022-02-22T20:16:06.397+00:00

In SharePoint Online, using C#, how do I retrieve a multiline textfield with append text?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,716 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,937 questions
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,981 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 35,556 Reputation points Microsoft Vendor
    2022-02-23T08:40:08.217+00:00

    Hi @Merrill, Travis Neil ,
    You can use ListItemVersion class to retrieve a multiline textfield. Here is the code for example

        ctx.Load(web, w => w.ServerRelativeUrl, w => w.Lists);  
    
        List list = web.Lists.GetByTitle("Test215");  
    
        ctx.Load(list);  
        CamlQuery camlQuery = new CamlQuery();  
        ListItemCollection itemColl = list.GetItems(camlQuery);  
    
        ctx.Load(itemColl);  
    
        ctx.ExecuteQuery();  
    
    
        foreach (ListItem item in itemColl)  
    
        {  
            Console.WriteLine(item["Title"].ToString());  
            ListItemVersionCollection itemversioncollection = item.Versions;  
    
            ctx.Load(itemversioncollection);  
    
            ctx.ExecuteQuery();  
    
            foreach (ListItemVersion version in itemversioncollection) {  
                Console.WriteLine(version.FieldValues["mult"] + "----------" + version.FieldValues["Modified"]);  
            }  
        }  
        Console.ReadLine();  
    

    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.



0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.