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
Andreea TAndreea T 

How to export results from an SOQL query to CSV?

How to export results from an SOQL query to CSV?
Currently I'm using workbench.developerforce.com, having 11500 records,view as: bulk csv, and here also its fail : Failed: InvalidBatch : Failed to process query: FUNCTIONALITY_NOT_ENABLED: Foreign Key Relationships not supported in Bulk Query. 
I downloaded FuseIT SFDC Explorer its shows that Failed to create an instance of FuseIT.G4S.SalesforceConnector.Entities.GenericSalesforceEnt‌​ity from htm__Organization_Assignment__c -> result.Id is required for an existing object. Parameter name : result.
How could I export results to CSV?
anil jadhav 8anil jadhav 8
Hi IMO,

There is no way to do this because salesforce does not support the foreign key relationship in Bulk.

you are currently limited to a single Table.

You can find the same issue raised in IdeaExchange 
https://sites.secure.force.com/success/ideaView?id=08730000000h6C2AAI

you can promote or comment if you feel you really useful.

Regards,
Anil