Hi @Manokaran, Murugesan (Muru),
Thanks for reaching out to us. We are very pleased to support you.
According to the information you provided and the research I have done, I may understand that you want to get the Multiple Lines of text field value using CSOM. If there is anything wrong, please correct me.
If there are no problems, attached here are two examples of using CSOM in either C# or PowerShell to get multiple lines of text.
C#:
using Microsoft.SharePoint.Client;
// Set up the context
ClientContext context = new ClientContext("https://yoursharepointsite");
List list = context.Web.Lists.GetByTitle("YourListName");
// Retrieve the list item
ListItem item = list.GetItemById(1); // Replace with your item ID
context.Load(item);
context.ExecuteQuery();
// Access the Multiple Lines of Text field value
string multilineTextValue = item["YourFieldName"].ToString();
Console.WriteLine(multilineTextValue);
PowerShell:
# Load the CSOM assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
# Set up the context
$siteUrl = "https://yoursharepointsite"
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$credentials = Get-Credential
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($credentials.UserName, $credentials.Password)
# Retrieve the list item
$list = $ctx.Web.Lists.GetByTitle("YourListName")
$item = $list.GetItemById(1) # Replace with your item ID
$ctx.Load($item)
$ctx.ExecuteQuery()
# Access the Multiple Lines of Text field value
$multilineTextValue = $item["YourFieldName"]
Write-Output $multilineTextValue
If you have any questions, please do not hesitate to contact me. Moreover, if the issue can be fixed successfully, please click "Accept Answer" so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.
Your kind contribution is much appreciated.