• Calin Fintzi 13
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
RelatedtoID on Email message and WhatID on Task both allow many different objects to be referenced. Is it possible to querty into the reference table of the object type that's in the field?

EX: If I know that the field contains a reference to a contract could I do the following:

SELECT Id, TextBody, MessageDate
FROM EmailMessage
WHERE RelatedTo.BalanceDue = 0 AND RelatedTo.Type = '#*@$'
The solution to this trailhead challenge is inside of the reading of the trailhead material, and the challenge references the LeadProcessor class from the Database.Batchable trailhead challenge which does not apply to this challenge.