function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jgoldsackjgoldsack 

INVALID_FIELD - Cannot find custom field

I have a VB.NET application, with version 6 of the API, that pulls data from certain SalesForce tables, and puts that data in some local SQL tables for analysis. I am having an error when I try to retrieve custom fields.

INVALID_FIELD:

select Id, AccountNumber, Active__c, AnnualRevenue, BillingCity
^
ERROR at Row:1:Column:27

No such column 'Active__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

I am building the query string thusly:

_sQuery = New StringBuilder
_sQuery.Append("select ")
_sQuery.Append("Id, ")
_sQuery.Append("AccountNumber, ")
_sQuery.Append("Active__c, ")
_sQuery.Append("AnnualRevenue, ")
_sQuery.Append("BillingCity, ")
...
 _sQuery.Append("from Account ")
_sQuery.Append("where LastModifiedDate > " & LastUpdate)
qr = binding.query(_sQuery.ToString)

When I run the query, the error occurs. It appears to happen to any custom field in any table I try and query. The custom field is in the WSDL, and is generated correctly in the .vb files for the wsdl. I am not sure what is going on here (could it be a permissions issue on the SalesForce user?), and would appreciate any help in this matter.

Message Edited by jgoldsack on 09-29-2005 08:42 AM

SuperfellSuperfell
Yes, could be a permissions issue, check the FLS settings on those fields.
jgoldsackjgoldsack

That was the problem. Thanks.