The field type is always required. See more about the type attribure in Record.setString() method You may use EncryptedString if you want to encrypt the string (password for instance). See more in Record.setString() method.