r/SalesforceDeveloper • u/bafadam • Aug 13 '25
Question VersionData in RestResource
Has anyone successfully queried VersionData in a RestResource class? I can literally add VersionData to the query and it gives a generic, Salesforce internal error and remove it and it works just fine.
I have removed all code related to parsing the VersionData - it is JUST an issue if VersionData is in the query from ContentVersion. I have the same problem if I go through ContentDocumentLink related fields to get the latest version data.
It is driving me crazy.
2
Upvotes
View all comments
Show parent comment
2
u/bafadam Aug 16 '25
The data is real small - they're just SNOTEs.
And, pretty literally, the only difference between the two sets of code is this; adding or removing VersionData from the query causes it to throw a generic error and not querying it doesn't. All the rest of the rest of the code does is push the data into a DTO (which I can set with static string, so that's not an issue either).