public void TestQueryContentVersion() { Salesforce.SalesforceProxy.sObject[] objects = sf.Query( "SELECT Title, Description, Id, OwnerId, ContentSize, ContentBodyId, PathOnClient FROM ContentVersion"); for (int i = 0; i < objects.Length; i++) { Salesforce.SalesforceProxy.ContentVersion att = (Salesforce.SalesforceProxy.ContentVersion)objects[i]; Console.WriteLine("{0}\t{1}\nDescription:\t{2}\nId:\t{3}\nOwnerId:{4}\nContentSize:\t{5}\nContentBodyId:{6}\nPathOnClient:{7}\n", i + 1, att.Title, att.Description, att.Id, att.OwnerId, att.ContentSize, att.ContentBodyId, att.PathOnClient); } }
public void TestCreateContentVersion() // ERROR - "One of these fields must be set: PathOnClient, ContentUrl." { Salesforce.SalesforceProxy.ContentVersion att = new Salesforce.SalesforceProxy.ContentVersion() { VersionData = Encoding.UTF8.GetBytes("abcde"), Description = "API-create Content Version", Title = "TestContentVersionFromCode", OwnerId = "0050b0000032fxTAAQ", // User ID - Mihaela Armanasu PathOnClient = "" }; Salesforce.SalesforceProxy.SaveResult result = sf.Create(att); }