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

SOQL - Convert Date To Owner Locale

We use the DBAmp for integrating Salesforce.com with SQL Server (which basically adds a linked server), and are running queries against our SF data using OPENQUERY. I'm trying to do some reporting against opportunities and want to return the created…
domager
  • 758
  • 5
  • 13
2
votes
3 answers

SQL to SOQL Conversion (Salesforce.com SOQL)

Has any one done SQL to SOQL Conversion for Salesforce.com Objects?
Sumit Pachnanda
2
votes
1 answer

SOQL - Querying for a list of users the current user is following

In my app I display a list of the current users. I request it like this: Attempt 1 List Following = [SELECT Id, Name, SmallPhotoUrl FROM User WHERE Id IN ( SELECT ParentId FROM EntitySubscription WHERE SubscriberId =…
Ryan Elkins
  • 5,731
  • 13
  • 41
  • 67
2
votes
1 answer

Salesforce SOQL Query with Self Join + Relationship (ContentDocument/ContentVersion)

I'm trying to write a SOQL query to retrieve some Salesforce Content records and am having a bit of difficulty figuring out my next step. I want to exclude all versions of a document if a custom field of any version of that document has a value (is…
Patrick
  • 971
  • 9
  • 17
2
votes
1 answer

SOQL date comparison for formula(date) date type

can anybody help me with writing a SOQL query. Using "Date" data type in WHERE statement is easy, it behaves like a normal Date would. But if the data type is "Formula(Date)" it seems like normal date time functions are not working. In sample query…
dvdbrk
  • 161
  • 2
  • 10
2
votes
1 answer

How do I display the results of an aggregate SOQL query on a Visualforce page?

I'm very new to Visualforce. I'm looking at this page here: http://force.siddheshkabe.co.in/2010/11/displaying-aggregate-result-on.html So when I added this code onto a VisualForce page: AggregateResult[] groupedResults = [SELECT Name, Days__c…
Gibson
  • 780
  • 3
  • 14
  • 33
2
votes
1 answer

Is it possible to Query EmailTemplates based on User/Profile permissions?

For some reason, whenever I query EmailTemplates or Folders in Apex, all of the EmailTemplates or Folders are returned regardless of User. Usually queries only return records the current User has permissions to view (at minimum). How can I query for…
Matt K
  • 7,207
  • 5
  • 39
  • 60
2
votes
1 answer

Fields get unwantedly concatenated in Salesforce SOQL query result. Developer nearly loses it

I'm probably missing something quite basic, but I'm getting very confused (and frustrated) with the results I get from my SOQL queries to the Salesforce API. My query: Select Id, FirstName, LastName FROM contact The resulting object (as rendered by…
GijsW
  • 67
  • 1
  • 9
2
votes
1 answer

Connecting to an external HTTP api behind a proxy from nifi

I have a apache/nifi:latest instance spun inside an Amazon Linux 2 EC2. For reference, see this guide: here I have a QuerySalesforceObject ver. 1.18.0 that makes use of StandardOauth2AccessTokenProvider. The oauth2 provider url is configured at…
Ben Cooper
  • 79
  • 5
2
votes
0 answers

Error retrieving query using ccrz.cc_CallContext ERROR Returned tmpVar1 Salesforce APEX

Having troubles figuring out why the query isn't returning the related Account for the Cart object. The original query was referencing the cart Encrypted ID and the current user Encrypted ID to query the related account for the cart. We have…
2
votes
1 answer

Complex query possible?

I have 3 tables, a parent table and 2 child tables. Lets say Mother_c is the parent. Then Child_c and Pet_c are the 2 child tables that have master-detail relationship pointer to Mother_c. I have the Id of one row from Child_c, I want to retrieve…
Joe
  • 3,664
  • 25
  • 27
2
votes
1 answer

Alternative for Workbench

Hope everyone will know, In recent days Workbench website is not functioning well and it's provide Application Error during SOQL Execution or any other operation. So May I know, Is there any other alternative website is available for Workbench? I…
Mohanraj Sivalingam
  • 231
  • 1
  • 8
  • 21
2
votes
1 answer

Salesforce API: How to retrieve a Case using a partial Case Id

I'd like to retrieve a Case record from the Salesforce API. I only have the beginning of the Case Id (don't ask why) so I've tried the following query: SELECT Id FROM Case WHERE Id LIKE 'whatever...%' Unfortunately, this returns the following…
urig
  • 16,016
  • 26
  • 115
  • 184
2
votes
1 answer

Salesforce, SOQL, Developer Console, sObject is not supported

In Developer Console in SOQL I try to select Product, but that is not possible. SELECT Id FROM Product Error: "sObject type 'Product' is not supported." image I found this advice: "There is a checkbox 'Use tooling API' at the bottom of the screen.…
Elo
  • 226
  • 5
  • 19
2
votes
1 answer

SOQL Select all columns in Azure Data Factory (Incremental Load from Salesforce)

Azure Data Factory gives an option to load data incrementally by using an SOQL query, Example bellow: Select COLUMN_1,...,COLUMN_N from Account Where COLUMN_X = 'VALUES_X' There is another solution: Delta copy from a database with a control table;…