Hi Devs,
First time trying to connect to Clarizen API. I am using the WebService with C#.
I am able to connect but the documented examples for querying the objects do not work. Has anyone gotten the query to work?
Here is what I have to date.
ClarizenSvc.ClarizenClient clarizenClient;
//Create a proxy to the Clarizen Web Service
clarizenClient = new ClarizenSvc.ClarizenClient();
ClarizenSvc.LoginOptions options = new ClarizenSvc.LoginOptions();
ClarizenSvc.LoginResult lr;
options.ApplicationId = "Sample c# client";
clarizenClient.Login("myemail", "mypassword", options, out lr);
string results = "";
if( lr.Success )
{
ClarizenSvc.EntityQuery customersQuery = new ClarizenSvc.EntityQuery();
customersQuery.TypeName = "Customer";
// Retrieve only name of each customer
ClarizenSvc.stringList sl = new ClarizenSvc.stringList();
sl.Add("Name");
customersQuery.Fields = sl;
// I HAVE NO IDEA WHAT TO DO NOW...
// THIS DOCUMENTED LINE DOES NOT WORK!
QueryResult qr = clarizenClient.Query(query);
}
else
{
results = lr.Error.Message;
}