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
Rajesh SriramuluRajesh Sriramulu 

workbench : InvalidJob: Unable to find object: attachments

Hi EveryOne,

 

When I try to export data from workbench when Iquery means it showing all records but when I try to download means it's showing error like this.

 

InvalidJob: Unable to find object: attachments.

 

query is SELECT id,(SELECT id FROM attachments) FROM Account where owner.isactive = false and owner.email like '%@gmail.com'.

 

Could any one please help on this.

And if any one knows how to export records displayed in developer console.

 

 

Thanks in Advance.

 

Thanks,

 

Rajesh.

Sonam_SFDCSonam_SFDC

I checked in workbench - the name of the table is Attachment - can you please edit that in your SOQL and try to run the query again.

Rajesh SriramuluRajesh Sriramulu

Hi,

 

Thanks for ur quick reply,

 

PSB

 

Firstly I tried with below query, it showing records but not able to export.

 

SELECT id,(SELECT id FROM attachments) FROM Account where owner.isactive = false and owner.email like '%@gmail.com'.

 

 

When I try with below query means error is showing which I given below.

 

SELECT id,(SELECT id FROM attachment) FROM Account where owner.isactive = false and owner.email like'%@gmail.com'.

 

 

ERROR at Row:1:Column:27.
Didn't understand relationship 'note' in FROM part of query call. If you are attempting to use a custom relationship, be. sure.to. append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the. appropriate names.

 

Please let me know how to get.

 

Thanks,

Rajesh.

Sonam_SFDCSonam_SFDC

Rajesh,

 

When I select Bulk CSV(which I assume you are also selecting in order to get the result in CSV which can be exported)

Note that BULK queries do not support nested SOQL which is the reason you are getting this error..

 

 

Rajesh SriramuluRajesh Sriramulu

Hi Sonam,

 

Once again thanks for ur reply, yes I select Bulk CSV to export records of accounts through Workbench.

 

Then how to export the below query :

 

SELECT id,accountid,(SELECT parentid FROM ATTACHMENTS) FROM opportunity where accountid IN (select id from account where owner.isactive = false and owner.email  like '%@gmail.com'

 

I tried with data loader, since the above query is having two nested queries so it cannot be retrieve.

 

I need the accounts having inactive users and having attachments related to accounts or cases or contact or opportunity.

 

Please let me know how to proceed. 

 

Thanks,

Rajesh.