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
6
votes
3 answers

The requested resource does not exist [error] in Salesforce. What is wrong with Salesforce?

I execute a SOQL request to get all available record ids of the SObject 'ObjectPermissions'. Then I use the request to GET /services/data/v48.0/sobjects/ObjectPermissions/{id} to fetch all the necessary info for a specific record. As you can see…
Pavlo Mykhailyshyn
  • 203
  • 1
  • 6
  • 20
6
votes
2 answers

SalesForce API query doesn't show custom fields

I have a custom date field for accounts in SalesForce: LastCheckedDate (API Name: LastCheckedDate__c) I'm trying to use the SalesForce Enterprise API to query accounts based on that field. It returns results, and I can use the custom field in the…
NChase
  • 1,638
  • 4
  • 22
  • 25
6
votes
3 answers

How to get SalesForce data to Python Panda dataframes

Currently we are taking SalesForce data in to CSV file and reading this CSV file in Pandas using read_csv, to_csv methods. Do we have any other way to get data from SalesForce to pandas dataframe.
DaraRamu
  • 185
  • 4
  • 9
6
votes
3 answers

parent-child relationship query in simple_salesforce python, extracting from ordered dicts

I'm trying to query information from salesforce using the simple_salesforce package in python. The problem is that it's nesting fields that are a part of a parent-child relationship into an ordered dict within an ordered dict I want.. from the…
Matt W.
  • 3,692
  • 2
  • 23
  • 46
6
votes
3 answers

How do I request a single random row from a force.com database in SOQL?

Total row-count is in the range 10k-100k rows. Can I use RAND() on force.com? Unfortunately although all the rows have a unique numeric identifier, there are many gaps, and I'd often want to select a random row from a filtered subset anyway. I…
Ollie C
  • 28,313
  • 34
  • 134
  • 217
6
votes
1 answer

Linq to Salesforce "SQL" provider

So, I have this new project. My company uses the SalesForce.com cloud to store information about day-to-day operations. My job is to write a new application that will, among other things, more seamlessly integrate the CRUD operations of this data…
KeithS
  • 70,210
  • 21
  • 112
  • 164
6
votes
3 answers

RForcecom accessing unknown field names

My final aim is to extract data from Salesforce accounts for general use in R. I spotted the RForcecom package (https://hiratake55.wordpress.com/2013/03/28/rforcecom/) which looks very useful indeed, thanks @hiratake55 for writing it! Unfortunately…
roman
  • 1,340
  • 9
  • 33
6
votes
5 answers

How to get Email from Task object record using SOQL

I am trying to get the Contact/Lead email from the Task object using SOQL (I am creating an interface in PHP to back up messages with a specific subject). Here is my query right now: SELECT…
Andrew Jackman
  • 13,781
  • 7
  • 35
  • 44
6
votes
1 answer

Salesforce - SOQL Use mod() or similar math functions in SELECT?

I'm trying to query all Opportunities that have a Price that's not a whole number (no decimals) or if its price is not multiple of 10. Im trying to find prices like: U$S 34,801.23 - U$S 56,103.69 - U$S 50,000.12 etc But not : U$S 49,500.00 - U$S…
user1860016
  • 61
  • 1
  • 2
5
votes
2 answers

Querying Salesforce Object Column Names w/SOQL

I am using the Salesforce SOQL snap in a SnapLogic integration between our Salesforce instance and an S3 bucket. I am trying to use a SOQL query in the Salesforce SOQL snap field "SOQL query*" to return the column names of an object. For example, I…
Travis
  • 401
  • 1
  • 5
  • 21
5
votes
2 answers

Salesforce/SOQL - Given child, how to return "top level" parent account?

I have an issue where I need to find the top level parent account for a child. The best I've been able to do is filter up from the child w/ SELECT id, name, parent.id, parent.parent.id, parent.parent.parent.id, FROM Account WHERE…
Dave S
  • 599
  • 2
  • 8
  • 17
5
votes
4 answers

Select All Fields of a Salesforce Object Using SOQL

I want to do something that could be done in SQL: select * from table How can this be achieved using SOQL? I won't be able to use Apex Code, because I run SOQL queries from a PHP page.
Usman Ali
  • 93
  • 1
  • 3
  • 10
5
votes
2 answers

SOQL Pagination for Salesforce API queries

Is there an efficient way to page through results from a SOQL query without bringing all the query results back and then discarding the majority of them? As an example, I'd like to be able to to page through the complete list of contacts showing 10…
Daniel Ballinger
  • 13,187
  • 11
  • 69
  • 96
4
votes
4 answers

Is there a way to validate the syntax of a Salesforce.com's SOQL query without executing it?

I'm writing an API that converts actions performed by a non-technical user into Salesforce.com SOQL 'SELECT', 'UPSERT', and 'DELETE' statements. Is there any resource, library, etc. out there that could validate the syntax of the generated SOQL? I'm…
Technetium
  • 5,902
  • 2
  • 43
  • 54
4
votes
1 answer

SalesForce - Get all the fields of an object using .Net SDK or Api

We have our system from where we want to push the records (e.g. Contact, Account, Opportunity, etc.) to SalesForce. To achieve this, we have used ForceToolKit for .Net. We are able to insert\update the records successfully using the ForceToolKit…
Mehul Vaghela
  • 478
  • 4
  • 20
1
2
3
49 50