• Marcel Barraza
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

If you don't want to hard code your recordtype ids in a SOQL query, here is an example on how to query using the record type name:

 

Select id, name,  type, RecordType.Name, AMOUNT, closedate, stagename

FROM Opportunity
WHERE recordtypeid in (Select Id From RecordType where sobjecttype = 'Opportunity' and name in ('Daily Open Quote Record Type', 'Prospect Record Type'))
limit 100