Search code examples
eclipsesalesforceapex-codesoql

how to get the name field of a record when given the id


I have a query:

SELECT Id, recordtypeid  FROM myObject__c  

but instead of returning the recordtype id, i want to return the recordtype name. How do i do that?


Solution

  • Select Id, RecordType.Name from myObject__c

    enter image description here