Questions tagged [soql]

SOQL is the Salesforce Object Query Language.

SOQL, the Salesforce Object Query Language is a SQL like syntax used on the force.com platform to query records within a Salesforce instance. It can be used in triggers, or fully fledged Apex code, or via their web services API.

748 questions
0
votes
1 answer

Combination of SOQL Statements String with Boolean Attributes

Do you have an idea on how can i combine the following SOQL statements into just one i tried several options and by creating the two entries i was able to get it to work.. i'm fairly new to APEX development and i really want to do the right thing i…
JeyJim
  • 21
  • 1
  • 2
  • 10
0
votes
1 answer

Updating contact email in user trigger in Salesforce

I have a trigger on a user object that is triggered on user updating and updates the contact fields (user linked to this contact), such as first name, last name and email. First and last name are updated correctly, but email field is not updated. I…
Hleb
  • 7,037
  • 12
  • 58
  • 117
0
votes
2 answers

Salesforce SOQL query return all values including NULL

I have a simple SOQL query: select Count(ID), CampaignId, Campaign.Name from CampaignMember where CampaignId in ('701U0000000MVoQ', '701U0000000MLFR', '701U0000000MVoL') group by CampaignId, Campaign.Name The result of the query brings back 2…
Ronnie
  • 1,053
  • 5
  • 18
  • 30
0
votes
1 answer

SOQL Query not bringing back parent with no comments

Due to the way this is structured I can't bring back groups with no comments/feeds in them, unfortunately trying to invert this brings up multiple errors as CollaborationGroup does not understand the relationship it has with…
ehime
  • 8,025
  • 14
  • 51
  • 110
0
votes
1 answer

How to Know in Apex Report is related to which object

i am trying to access the Report objects in apex but getting limited fields my apex source code is public Class MyController{ public List getReports(){ List rep1 = new List(); rep1=[Select…
mathlearner
  • 7,509
  • 31
  • 126
  • 189
0
votes
1 answer

Returning all Salesforce contacts associated with an account via query from third-party site

I'm using Survey Gizmo and I want to pull in all contact emails associated with an account. This query works, but it only pulls in the first contact and I need them all: SELECT Id,Contact.Email FROM Contact WHERE AccountId =…
0
votes
1 answer

FATAL_ERROR|System.DmlException: Delete failed. First exception on row 0

i have a batch class with code public class BatchDeleteEvents implements Database.Batchable, Database.Stateful, Database.AllowsCallouts { private String query; private String pageToken ; private String CalendarId; private String accessToken; public…
mathlearner
  • 7,509
  • 31
  • 126
  • 189
0
votes
1 answer

Getting List of Open Events in salesforce

i have to retrieve list of Open Events in salesforce i am using following method for getting list of open Events public List getActivity1(){ Meeting_Master__c mmm= [SELECT (SELECT Subject,Location__c,EndDateTime,StartDateTime …
mathlearner
  • 7,509
  • 31
  • 126
  • 189
0
votes
1 answer

Apex Component Controller can not get value from apex:inputText/inputField

I have a simple custom component that I want to use to send an email. The structure is like this:
0
votes
2 answers

no viable alternative at character ''

I'm getting this error when trying to execute the following. I get my deadline date from a Visualpage which is binded directly to a controller. QueryException: line 1:322 no viable alternative at character ' ' My Query being executed: Select…
raym0nd
  • 3,172
  • 7
  • 36
  • 73
0
votes
2 answers

Salesforce SOQL returning wrong set

I am executing a SOQL and when I am firing SELECT COUNT(ID) FROM Contact then it's returning 12958 no of result set but when I am firing SELECT LastName, ts2__Text_Resume__c FROM Contact then only 890 results are coming, though size of result…
Vardan Gupta
  • 3,505
  • 5
  • 31
  • 40
0
votes
1 answer

How to access to column that is returned SOQL relationship query?

Following code is not working. The error message is "Compile Error: Initial term of field expression must be a concrete SObject: LIST at line 8 column 16" (return line is line 8) public String getX(){ List o = [SELECT …
mustafatop
  • 47
  • 2
  • 11
0
votes
2 answers

SOQL in apex - Getting unmatched results from two object types

Does any one know how to write an SOQL in apex for below scenario " There are two object say "Countries" and "MappedCountries" where Countries object will have a complete list of Countries and MappedCountries will only have a few Countries(it is…
565
  • 615
  • 2
  • 10
  • 19
0
votes
1 answer

Adding Columns dynamically to Salesforce Reports

I need to add columns to a salesforce report dynamically(based on particular conditions). I'm planning to do this with a trigger that is looking for my conditions. My two questions, Is it possible to adding columns dynamically for a Report? Can…
highfive
  • 628
  • 3
  • 12
  • 31
0
votes
4 answers

SalesForce limit on SOQL?

Using the PHP library for salesforce I am running: SELECT ... FROM Account LIMIT 100 But the LIMIT is always capped at 25 records. I am selecting many fields (60 fields). Is this a concrete limit? The skeleton code: $client = new…
Elliot Chance
  • 5,526
  • 10
  • 49
  • 80