To check whether the list item contains the attachment programmatically or using CSOM. Get the list item collection and then check for the attachment column. List listEvent = web.Lists.GetByTitle(listName); clientContext.Load(listEvent, L => L.Id); CamlQuery camlQuery2 = new CamlQuery(); camlQuery2.ViewXml = "<View><Query></View></Query>"; ListItemCollection item_Coll = listEventSource.GetItems(camlQuery2); clientContext.Load(item_Coll); clientContext.ExecuteQuery(); foreach (ListItem oLstItem in item_Coll) { bool attachmentPresent = Convert.ToBoolean(oLstItem["Attachments"]); if (attachmentPresent) { Console.WriteLine("Item is present"); } } Happy Coding !!!!!
Techrobbers provides information related to Modern SharePoint, SharePoint Online, SharePoint Framework, Power Automate, PowerShell, PnP, Microsoft Teams and other things which are related to Microsoft 365.