0
votes

I have a scenario where I would like to fetch all the deleted records at salesforce end and send to UI using java.

I tried with the following SOQL:

SELECT Id, IsDeleted, CreatedDate, LastModifiedDate FROM Note ALL ROWS

I end up with response as:

[ {
  "message" : "ALL ROWS not allowed in this context",
  "errorCode" : "MALFORMED_QUERY"
} ]

Can someone help me on this?

1
You need to use the queryAll call / endpoint instead of using ALL ROWSsuperfell
@superfell: Thanks for the suggestion. queryAll did work for me.David Sam

1 Answers

1
votes

The "ALL ROWS" option is only supported by Apex SOQL queries. You can't use it with REST calls or in the developer console.

https://developer.salesforce.com/forums/?id=906F00000008teaIAA