I have upload the file from the c#.net by using the following code and document created successfully in Salesforce org.
sforce.Document docvar = new sforce.Document();
docvar.Name = documentName;
docvar.Description = description;
docvar.FolderId = folder.id;
string extension = fileinfo.Extension;
docvar.Type = extension.Replace(".", "");
sforce.SaveResult saveResult = SFDCService.create(new sforce.sObject[] { docvar})[0];
return saveResult;
I dont know how to update the document. I have tried following code. But no luck.
sforce.QueryResult qr = null;
string SOQL = "";
SOQL = "select id,name,description from document where id='" + _documentId + "'";
qr = SFDCService.query(SOQL);
sforce.sObject[] records1 = qr.records;
sforce.Document doc = (sforce.Document)records1[0];
sforce.SaveResult saveResult = SFDCService.update(new sforce.sObject[] {doc})[0];
return saveResult;
Can you let me know how to update when click the update button form the c#.