A Salesforce Object Query Language (SOQL), modeled on SQL, for accessing information saved in the Salesforce database.
0
votes
1answer
12 views
Using children in WHERE criteria of Parent-to-Child SOQL query
Can't seem to find an example of this.
trigger Opportunity_Triggers on Opportunity (after insert, after update, after delete) {
List<Account> accList = [SELECT Id, (SELECT Id, AccountId ...
4
votes
1answer
19 views
Avoiding SOQL limits in a recursive method
I have a SOQL query in a recursive FOR loop. It didn't give me SOQL limit issues on my test data, but apparently we have a managed package whose Apex is hitting the limit due to this code.
public ...
5
votes
3answers
34 views
At what point in the transaction lifecycle is SystemModstamp set?
I'm writing an integration that requires polling Salesforce to pull down changed data. I'm worried about concurrent updates to the records that would cause me to 'miss' updates.
Concrete example:
...
7
votes
2answers
40 views
Can I assign Aggregate SOQL Result directly to variable?
Salesforce documentation suggests that aggregrate soql results must first be assigned to an instance of the AggregateResult class, as shown below:
AggregateResult[] groupedResults = [SELECT ...
2
votes
1answer
47 views
Batch Apex throwing error when executing query ( SQLException [common.exception.SfdcSqlException: ORA-01013:)
I am trying to execute a Batch job that is processing around 2 million contacts, I batch Apex whenever I try to execute is throwing an error
First error: SQLException ...
2
votes
1answer
16 views
SOQL query to load all documents in a content library
I am trying to query for all the documents in a library using the BULK API. The SOQL query I use is
SELECT ...
2
votes
1answer
18 views
Trying to create Rollup but values not showing up in Field to Aggregate
here is my ServiceItem_Summary view:
However when I try to create a rollup summary in Case, my newly added field NonWarrantedServiceType is not showing up in the Field to Aggregate drop down. Do ...
8
votes
2answers
63 views
Is it possible to assign Permission Sets Owned By Profile?
Using PermissionSet() and SOQL we can list the permission sets which are owned by profile Select Id,Name, IsOwnedByProfile, Profile.Name, Label from PermissionSet where IsOwnedByProfile=TRUE
My ...
2
votes
1answer
25 views
Refering Product using productId in pricebookentry
I have created a custom object called Top5UpSells on Leads page which basically shows the top 5 potential UpSell opportunities for that lead based on his product interest captured in another custom ...
3
votes
2answers
47 views
Database.query not returning records properly as needed
I am using database.query to extract records. I am passing a query from the front end.The query can be anything.
But I am not getting the records properly in return.
For example, if I am passing the ...
5
votes
1answer
22 views
Problem with looping through EntitySubscription
Im passing an array of Ids from my JS into currentUserId,
JS
<apex:form >
<apex:actionFunction action="{! removeFollower }" name="processId" oncomplete="refresh()">
...
4
votes
2answers
64 views
Before Insert Trigger - Query Only Related Records To Incoming Record
Ideally this trigger would look to see if a record of a certain record type has a yes flag and set it to no before inserting a new record (all under the same related Contact_c). More specifically, I ...
6
votes
2answers
46 views
How to take a filed value after dynamic SOQL
I am trying to get field value from a dynamic SOQL result. Here i have a object where end user need to enter the field name which he need. I am SOQL it like this:
UserprofileSOQL = ...
3
votes
1answer
39 views
Best approach for monitoring events dynamically?
I want to monitor for inserts and updates on objects over a specified period of time. I don't know in advance which objects I need to monitor. My constraints are the govenor limits and accuracy. I ...
4
votes
1answer
36 views
Problem updating table with SOQL
I want to update Notes__c. It's a textarea field so I assume I want to pass a String value into it, but in order to write my query, I have to declare 'myNote' as a List.
At the moment I receive this ...