Posts

Showing posts with the label Document

Uploading a document or file to Salesforce

I have done a small POC for uploading a file through Salesforce API.  C# binding = new SforceService(); binding.Timeout = 60000; LoginResult lr; try { Console.WriteLine("LOGGING IN NOW..."); lr = binding.login(username, password); } catch (SoapException e) { } private void uploadFile() { QueryResult qr = null; binding.QueryOptionsValue = new QueryOptions(); binding.QueryOptionsValue.batchSize = 250; binding.QueryOptionsValue.batchSizeSpecified = true; Folder rF=null; try { qr = binding.query("SELECT AccessType, Id, DeveloperName, Name, NamespacePrefix, IsReadonly, Type FROM Folder where DeveloperName='WSDLUpload'"); if (qr.size > 0) { Console.Write...