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
Gurchet Singh 11Gurchet Singh 11 

when i get lookup field(Course__r.Name) in child object's(Subject__c) select query then it returns id rather then name

Query:
SELECT studentmanage__Course__c.Name FROM studentmanage__subject__c;
Pankaj_GanwaniPankaj_Ganwani
Hi,

It should return Name of the corresponding Parent record. Where have you tested it?

Can you try using below:
studentmanage__subject__c obj= [SELECT studentmanage__Course__r.Name FROM studentmanage__subject__c LIMIT 1];
system.debug(obj.studentmanage__Course__r.Name);