I want to build a query to order result based on Child field like this:
select id, name, other_field, (select id, name, other_field from Child__r) from Parent order by Child__r.name
But, I am getting an error message. I've searched Salesforce documentations, but did not find anything.
Edit: ERROR message added below:
INVALID_FIELD: order by Child__r.name ^ ERROR at Row:1:Column:254
Didn't understand relationship 'Child__r' in field path. 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.