I am uploading document using smartoobject in sharepoint document library. I want to add current user name to person or group column in document library.
I am using sharepoint content service. Getting below error.
Error occurred trying to Execute (SmoSPDocument) - System.Exception: Invalid data has been used to update the list item. The field you are trying to update may be read only.
at SourceCode.SharePoint.Client.FileFunctions.uploadDocument(String fileName, Folder folder, Byte[] documentStream, ContentType contentType, RuntimeField[] metadataFields, Boolean overwrite)
at SourceCode.SharePoint.Client.DocumentFunctions.UploadDocument(String fileName, ContentType contentType, String fileContents, String subfolderPath, Boolean overwrite, String versionComment, RuntimeField[] metadataFields)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.executeUploadDocument(Property[] inputs, MethodParameters methodParams)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.callCreateMethod(Property[] inputs, Property[] returns, Method method)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.Execute(Property[] inputs, RequiredProperties required, Property[] returns, Method method) Error occurred trying to Execute (SmoSPDocument) - System.Exception: Invalid data has been used to update the list item. The field you are trying to update may be read only.
at SourceCode.SharePoint.Client.FileFunctions.uploadDocument(String fileName, Folder folder, Byte[] documentStream, ContentType contentType, RuntimeField[] metadataFields, Boolean overwrite)
at SourceCode.SharePoint.Client.DocumentFunctions.UploadDocument(String fileName, ContentType contentType, String fileContents, String subfolderPath, Boolean overwrite, String versionComment, RuntimeField[] metadataFields)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.executeUploadDocument(Property[] inputs, MethodParameters methodParams)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.callCreateMethod(Property[] inputs, Property[] returns, Method method)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.Execute(Property[] inputs, RequiredProperties required, Property[] returns, Method method)