File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
force-app/main/default/classes/selector Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1- public with sharing class AccountSelector implements SOQL .Selector {
1+ public inherited sharing class AccountSelector implements SOQL .Selector {
22 public static SOQL query () {
33 return SOQL .of (Account .SObjectType )
4- .with (new List <SObjectField >{
5- Account .Name ,
6- Account .AccountNumber
7- })
4+ .with (Account .Name , Account .AccountNumber )
85 .systemMode ()
96 .withoutSharing ();
107 }
118
129 public static SOQL byRecordType (String rt ) {
13- return query ().with (new List <SObjectField >{
14- Account .BillingCity ,
15- Account .BillingCountry
16- }).whereAre (SOQL .Filter .recordType ().equal (rt ));
10+ return query ()
11+ .with (Account .BillingCity , Account .BillingCountry )
12+ .whereAre (SOQL .Filter .recordType ().equal (rt ));
1713 }
1814}
Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ public with sharing class ExampleController {
22
33 public static List <Account > getPartnerAccounts (String accountName ) {
44 return AccountSelector .query ()
5- .with (Account .BillingCity )
6- .with (Account .BillingCountry )
5+ .with (Account .BillingCity , Account .BillingCountry )
76 .whereAre (SOQL .FilterGroup
87 .add (SOQL .Filter .name ().contains (accountName ))
98 .add (SOQL .Filter .recordType ().equal (' Partner' ))
You can’t perform that action at this time.
0 commit comments