question

MerrillTravisNeil-6289 avatar image
0 Votes"
MerrillTravisNeil-6289 asked WendyLi-MSFT commented

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

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

dotnet-csharpoffice-sharepoint-onlinesharepoint-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RaytheonXie-MSFT avatar image
0 Votes"
RaytheonXie-MSFT answered WendyLi-MSFT commented

Hi @MerrillTravisNeil-6289 ,
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.




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MerrillTravisNeil-6289 If Raytheon's answer helps you, please remember to accept it as answer, this behavior will help others who may meet the similar issue in the future to find the correct answer quickly. :)

1 Vote 1 ·

Hi @MerrillTravisNeil-6289 ,
Have you tried the solution I proposed?

If you have any questions or progress, you can contact me in time.

Looking forward to your reply

Have a lucky day!

Thanks,
Raytheon Xie

0 Votes 0 ·