wadewegner/Force.com-Toolkit-for-NET

QueryByIdAsync method not working for custom object

Closed this issue · 1 comments

Hello wadewegner,

I have just started using your Toolkit for my code. So far I am using the QueryAsync method with no issue and was looking for a method that could return an object record by using the record Id, QueryByIdAsync seems to be the correct method for this use case but it is failing with my custom object. It seems the method is unable to retrieve all the fields for the Query. This is the Error I am seeing

Salesforce.Common.ForceException:
SELECT FROM Simulator_Software__c WHERE
^
ERROR at Row:1:Column:8
unexpected token: 'FROM'
at Salesforce.Common.JsonHttpClient.HttpGetAsync[T](Uri uri)
at Salesforce.Common.JsonHttpClient.HttpGetAsync[T](String urlSuffix)

And when I look in the source code this is the $"{fields}" variable that is filled by using the
await GetFieldsCommaSeparatedListAsync(objectName);

image

Is this because this only works with out of the box objects in Salesforce?

Darn I had not seen that I had no getter setters in the class I created and was passing to the method....