I am trying to use the following code to assign a value to a Data/Blob type field with RepositoryAccess 10.0, but the field is not assigned and no error is thrown. I can use the same logic to assign String, Date, Numeric, etc. type fields, but cannot get it to work with Data-type fields. In the code below, the Data-type field does not get assigned but the String-type field does get assigned. I have tried assigning a string value and a byte array value, separately, without success. Should a different type of object be used or am I missing another detail?
Server serv = new Server("my serv"); RepositoryRegistration rep = new RepositoryRegistration(serv, "my rep"); Session session = new Session(); session.CanShareLicense = true; session.LogIn(rep); int docId = Document.Create("my doc", "DEFAULT", EntryNameOption.AutoRename, session); DocumentInfo lfEntry = Document.GetDocumentInfo(docId, session); FieldValueCollection lfFData = lfEntry.GetFieldValues(); lfFData["Data Field Name"] = System.Text.Encoding.Unicode.GetBytes("test value"); lfFData["String Field Name"] = "1234"; lfEntry.SetFieldValues(lfFData); lfEntry.Save(); session.Close();