Hot answers tagged

1

When doing joins that pull in parent fields, you need to use the Relationship Name of the field, not its API Name. In this case, OwnerId should instead be Owner, and WhatId should instead be What. Unfortunately, joins typically do not work on polymorphic fields, and I am fairly sure What.Name will still fail. It is, however, the only correct field path.


1

You want cases with a CreatedDate that is longer than 10 years ago. LAST_N_YEARS is defined as Starts 00:00:00 on January 1 of the previous year and continues through the end of December 31 of the previous nth year. That would be the following range: 1/1/2020 - 12/31/2011 By saying CreatedDate > LAST_N_YEARS:10 you're actually asking for records whose ...


Only top voted, non community-wiki answers of a minimum length are eligible