function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Madhuri LondheMadhuri Londhe 

Soql query on product item transaction help

I am writing query on Object ' Product Item Consumed'. It has lookup field 'Related Record'
I have to fetch fields of its parent.
please help me to write SOQL.
I tried below Query but its giving error.
SOQL :SELECT ProductItemId,RelatedRecord.Serial_Number__c FROM ProductItemTransaction where RelatedRecord.Id != NULL

Error:ERROR at Row:1:Column:22
No such column 'Serial_Number__c' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

User-added image
Madhuri LondheMadhuri Londhe
Thanks Rana for quick responce.
But my lookup field is refering two different objects.
hope you understand my problem
Madhuri LondheMadhuri Londhe
It is there in field Service lightning.