+ Start a Discussion

Query results custom fields missing when blank

I am updating a ColdFusion app written for API version 11.1 so that it will work with API version 19. I am encountering a strange issue when trying to retrieve custom fields that may or may not have data in them.


I am submitting the following querystring:

SELECT Id, CustomField1__c, CustomField2__c, CustomField3_ID__c, LastModifiedDate FROM Account Where IsPersonAccount = FALSE


The XML results simply omit custom fields that have no data, rather than returning the field name and an empty string. This plays havoc with my app since it creates a field list based on the first record in the results.


Is there a way to ensure that all fields are returned by the query() call even if they don't have a value?