This question already has an answer here:
- How Get Parent Field in Attachment? 2 answers
I am able to get standard field of parent object in attachment:
SELECT Id, Parent.Name, CreatedBy.Name FROM Attachment
But how to get custom field from parent attachment, something like:
SELECT Id, Parent.Name, CreatedBy.Name, Parent.Custom_Field__c FROM Attachment
How can I achieve this?