Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 54890

Salesforce Object Query Language (SOQL), modeled on SQL, for accessing information saved in the Salesforce database.

4 votes
1 answer
636 views

Find distinct accounts and fetch their respective record ids?

I'm trying to fetch person account records that are unique and I'm trying an aggregate query as such: SELECT count(Id), FirstName, LastName, PersonEmail FROM Account WHERE IsPersonAccount = true GR …
erikvm's user avatar
  • 711
2 votes
1 answer
442 views

How do efficiently store child and parent relation in a map retrieved from a nested SOQL?

I've got the following query: List<Order> orders = [SELECT Id, (SELECT Id, Type_Reference__c FROM Cases__r) FROM Order WHERE Id IN :orderIds]; and I need to store that information in the following …
erikvm's user avatar
  • 711
0 votes
2 answers
349 views

AggregateResult query limit

I'm trying to query for all unique accounts that has a first name, last name and person email by using this query: List<AggregateResult> checkUniquePersonAccounts = [ SELECT count(Id), count(FirstNam …
erikvm's user avatar
  • 711
-1 votes
1 answer
629 views

SOQL statement inside a getter/setter - what benefits?

I've seen some SOQL done in a getter as such: public static Map<String, sObjectHere> methodName { get { someMapHere = new Map<String, sObjectHere>(); List<sObjectHere … someMapHere.put(key, value); } return someMapHere; } private set; } What benefits des this serve over a regular method that returns a soql
erikvm's user avatar
  • 711
0 votes
1 answer
252 views

Testing a batch class where I need to modify System fields?

id=000332070&type=1 However, I can't seem to find the record with a soql query inside my test class String accountJSON = '{"attributes":{"type":"Account","url":"/services/data/v25.0/sobjects/Account/0013M00001AikcgQAB …
erikvm's user avatar
  • 711