When I am trying to query ContentDownloadUrl on the entity ContentDistribution I am getting the error as 'No such column 'ContentDownloadUrl' on entity 'ContentDistribution'.

But when I am executing the same query in QueryEditor I am getting the result.

Please refer to the below images.

ContentDistribution Query in Apex Code

ContentDistribution Query in queryEditor

1 Answer 1


Usually this happens when your api version of apex code is older, in developer console code runs against the latest api version.

Try to upgrade your apex code's version to latest; if its not already.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.