Hot answers tagged

3 votes
Accepted

What is the 'ids' system variable in salesforce?

This is actually pretty easy to follow, once you find out how it works. Basically, this is just normal HTTP standards working in unison. To start off, when you submit a form, it creates an HTTP ...
sfdcfox's user avatar
  • 487k
3 votes
Accepted

How to iterate over map with id and Sobject list

String[] names = new String[0]; for(Spot__c spotRecord: spotMap.values()) { names.add(spotRecord.Status__r.Name); } Or you can substitute with a Set, if you just want the unique values. However, it ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

SOQL inside invocable method returns no results

The invocable method is Apex and exists in a class that can be with or without sharing. If it is the former, then the SOQL query will only return data to which the contextual user has sharing access. ...
Phil W's user avatar
  • 35.6k
1 vote
Accepted

apex list of object

You can use a map to store the sum of the January_Volume__c and April_Volume__c fields for each year. You can use the Year__c field as the key and the sum as the value. You can then access the map by ...
Tushar Jadav's user avatar
  • 1,477
1 vote

Not able to add list<String> BCC to setBccAddresses ,VARIABLE_ASSIGNMENT [885 line] common.apex.runtime.impl.ScalarList@3fc50cb5

The code you have on the server is not the code you have in VS Code; the line of code that reads if(results[i].Success) { should be if(results[i].isSuccess()) {, so the code fails to compile and ...
sfdcfox's user avatar
  • 487k
1 vote
Accepted

update fields in a records which is coming as a string

Assuming * is the separator between the fields and values : First, we need to split the string by comma for fetching list of all field value pairs like below : String apiStr = 'field1*Value1,Field2*...
Rohit's user avatar
  • 1,734
1 vote

update fields in a records which is coming as a string

Try String.split(): Returns a list that contains each substring of the String that is terminated by either the regular expression regExp or the end of the String.
DevelBase2's user avatar
1 vote

Apex - break list into multiple small lists before processing

I came up with this method which will allow you to specify a dynamic partition size and split any list of SObjects to n-lists of the specified size. public static List<List<SObject>> ...
Shanerk's user avatar
  • 1,055

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