2

I try to upload file to document library with metadata. When I enter validation for one column the file does not upload even data is correct or incorrect. Always show this exception

List data validation failed

My Code Is

if (documentsList.BaseType == BaseType.DocumentLibrary)
{   
    Folder DocLib = documentsList.RootFolder;

    FileCreationInformation DocItemInfo = new FileCreationInformation();
    DocItemInfo.ContentStream = GetImageFile();
    DocItemInfo.Overwrite = true;

    DocItemInfo.Url = "Test.JPG";
    Microsoft.SharePoint.Client.File file = DocLib.Files.Add(DocItemInfo);

    ListItem newItem = file.ListItemAllFields;

    FillSPLitem(ref newItem); // To get MetaData

    newItem.Update();

    clientContext.ExecuteQuery();
}
Jan Zahradník
  • 2,417
  • 2
  • 33
  • 44
  • please check if it is related to your column validation or can you please tell your validation. The formula must return a True or False. – Ankur Jun 08 '15 at 18:23

0 Answers0