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
4
votes
2 answers

Fetch picklist values through SOQL query in Salesforce

I am using Djnago & Salesforce. I establish connection between them through simple-salesforce I have created a custom picklist on Contact Object of Salesforce. I wont to fetch all the 20 values of my picklist & display in Django. I am looking for…
Jeevan Bodas
  • 148
  • 5
  • 13
4
votes
0 answers

How to send AJAX request without encoding url

I am trying to get data from salesforce API using SOQL method. Problem is that when send ajax get request it encodes url that results in failure of $ajax request. How can I send plain url in ajax request without encoding url. Sample request is…
Faisal Ijaz
  • 1,812
  • 2
  • 12
  • 23
4
votes
1 answer

Salesforce SOQL set batchsize in REST api

Is there a way to set the batch size to 2000 (maximum)? I know it is possible via soap API by adding an option: see here Is there a way to achieve this via REST API POST request?
Keven Wang
  • 1,208
  • 17
  • 28
4
votes
1 answer

salesforce soql campaigns with influenced opportunities

I'm trying to create a SOQL query that returns a list of Campaigns with Influenced Opportunties, similar to the standard campaign report with the same name. The following doesn't seem to be returning the same values as the report: SELECT Id,Name…
rms58
  • 43
  • 1
  • 5
4
votes
1 answer

SOQL Escape Characters

I'm trying to get my Escape characters to work in Force.com explorer. This is exactly what the data looks like in Salesforce, Awaiting Custodian Data - Pending '8' I need to filter in on this data with a query statement like this, Where…
Bryan Harrington
  • 991
  • 2
  • 17
  • 31
3
votes
1 answer

LimitException: Too many query rows: 50001 from with count() aggregate function

I have a Visualforce page where I'd like to display a count of the number of records in a particular sObject table. In the Visualforce page I'd have something fairly simple, like:

Client Account Count: {!ClientAccountCount}

Then in the…
Daniel Ballinger
  • 13,187
  • 11
  • 69
  • 96
3
votes
4 answers

How do I get a list of fields in a generic sObject?

I'm trying to build a query builder, where the sObject result can contain an indeterminate number of fields. I'm using the result to build a dynamic table, but I can't figure out a way to read the sObject for a list of fields that were in the…
Gabriel Alack
  • 472
  • 2
  • 6
  • 16
3
votes
2 answers

How do I determine if a Field in Salesforce.com stores integers?

I'm writing an integration between Salesforce.com and another service, and I've hit a problem with integer fields. In Salesforce.com I've defined a field of type "Number" with "Decimal Places" set to "0". In the other service, it is stored…
Technetium
  • 5,902
  • 2
  • 43
  • 54
3
votes
2 answers

Is there a way to group by the date portion of a datetime field in SOQL?

Is there a way (without creating a formula datevalue(datetime) field) to aggregate a SOQL query on the date portion of a datetime field? For example, I'd like to do something like: select datevalue(datetimeField), count(Id) from object__c group by…
barelyknown
  • 5,510
  • 3
  • 34
  • 46
3
votes
4 answers

What is the SOQL to get all Public Calendars, in a Salesforce instance?

Does anyone know how to perform a query to get all public calendars? You can see the list by going to Setup ... Customize ... Activities .. Public Calendars and Resources What are these calendar objects? My goal is to find a way to show these…
Bryan
  • 1,103
  • 12
  • 16
3
votes
1 answer

System.SObjectException: SObject row was retrieved via SOQL without querying the requested field:

I have a custom object called Technology__c and join object called AccountTechnologies which is a join object between Account and Technology__c .So AccountTechnologies has a master detail relationship from both sides. I have added a count__c roll-up…
yatish mehta
  • 905
  • 1
  • 10
  • 25
3
votes
1 answer

Is it possible to subquery using SOSL?

I have a SOSL query that finds Salesforce Campaigns, and that's working just fine. However, I need to retrieve all Account Team Members for each returned Campaign. Is it possible to add a subquery to SOSL? Here's what I have so…
Matt K
  • 7,207
  • 5
  • 39
  • 60
3
votes
1 answer

Where clause on a Salesforce subquery

I'm running into some trouble filtering my SOQL Query by date where the date field belongs to the child of the object I'm querying. I couldn't find anything in the documentation, and I tried two different queries, both of which failed: SELECT Name,…
Scott
  • 324
  • 2
  • 4
  • 15
3
votes
1 answer

How can i use select * in SOQL query in Salesforce?

I am trying to run a select in Salesforce as follows: SELECT [Account].* FROM [Account] WHERE [Account].Id IN ('123456789012345678') but gives an error: "Unknown error parsing query" How can i do this selection ?
Abbey
  • 153
  • 2
  • 11
3
votes
2 answers

SOQL Query - How to write a SOQL query by making a field to lowercase and compare?

Following query returns an error: Query: SELECT Id, FirstName, LastName, OwnerId, PersonEmail FROM Account WHERE lower(PersonEmail) = lower('abc.DEF@org.cOM') API Response: success: false result: Dictionary error: IntegrationError …
Rakmo
  • 436
  • 2
  • 7
  • 18
1 2
3
49 50