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

Can't select User ID from Salesforce

I'm trying to select user's subordinates from Salesforce, but a simple query SELECT Id FROM User WHERE ManagerId=xxxxxxxxx returns bunch of null values, when I run SELECT Id,Name FROM User WHERE ManagerId=xxxxxxxx I get the correct names, still no…
gh0st
  • 214
  • 3
  • 15
0
votes
1 answer

Overcoming SOQL limits on the number of query results

We're executing a query: SELECT Id, SomeField FROM SomeTable We have over 80,000 items in SomeTable but only 2000 items are ever returned SELECT Id, SomeField FROM SomeTable LIMIT 100000 does nothing to fix the problem. What is the optimal way to…
Brooks
  • 2,082
  • 2
  • 18
  • 26
0
votes
1 answer

Salesforce retrieve object data

So far, this query works fine SELECT * FROM Contact, which retrieves all contacts from the Contact object, but now I'm trying to fetch data from Education__c, so I tried SELECT * FROM Education__c. This is what I have: $query = "SELECT * FROM…
Stupid.Fat.Cat
  • 10,755
  • 23
  • 83
  • 144
0
votes
2 answers

SOQL query, formulate query for more than one

I'm making a search box in php accessing data from a SOQL salesforce database. So far I have this: $query = "SELECT Id, FirstName, LastName, Phone From Contact WHERE FirstName = '$var'"; Which works perfectly fine. However, how would I make it so…
Stupid.Fat.Cat
  • 10,755
  • 23
  • 83
  • 144
0
votes
1 answer

Displaying multi-subquery, dynamic field, dynamic object SOQL query results on a VF page

I want to pass a SOQL query to a page, or have the users enter it on the page themselves, process it, and then display results in a table. Biggest problem is displaying the results, as VF dynamic binding only seems to be working one level deep,…
Kirill Yunussov
  • 1,955
  • 1
  • 21
  • 24
0
votes
1 answer

SOQL - APEX - List

Hello Folks, I have a list which has values from a query. The list has multiple fields, how can I access a specific field from this list? Problem: List listS = [Select (Select S__c from AS__r …
subodhbahl
  • 415
  • 9
  • 22
0
votes
1 answer

Creating a PaymentConnect processor connection in APEX Sandbox

Right now, I'm programming a controller for a donation system that uses Payconnect and PayPal. For testing purposes, I want to create a sample Payment Processor Connection object using 'new pymt__Processor_Connection_c'. However, I can't upsert the…
sophistry
  • 117
  • 1
  • 2
  • 12
0
votes
1 answer

Salesforce APEX - Test context returning null for related objects

When writing a testMethod I am unable to retrieve related contact fields. In the example below I would expect the final assert to return true. The code I am testing works fine, the select is only failing in a testing context. Why is the Contact…
ebrown
  • 811
  • 1
  • 8
  • 13
0
votes
1 answer

Salesforce SOQL query to find an opportunity, given its parent account id?

How can you write a SOQL (Salesforce query language) query to find an opportunity, given its parent account's account id? I want to do something like this (doesn't work though): SELECT Id, Name FROM Opportunity WHERE AccountId = '003D000000f0gfH'
Jeff
  • 2,778
  • 6
  • 23
  • 27
0
votes
2 answers

Using comparison in Strings in SOQL

One of columns(id) in Salesforce custom object is String type though it always contains long type values. I want to run query something like this. Where id >= '123' and id <= '123456'; Is there any solution for this? It's not possible to change…
RandomQuestion
  • 6,778
  • 17
  • 61
  • 97
0
votes
1 answer

soql query in apex?

I'm new to this, so sorry about this q. I have 2 objects in an MDR: Child_c and Contacts. I have a list of child_c records which contains the contact_id. From the contact object, I need to get the firstName, lastName, Id (which ='s the contact_id…
PartOfTheOhana
  • 667
  • 2
  • 16
  • 40
0
votes
2 answers

SOQL requesting VersionData from ContentVersion causes drama

Executing the following query "Select C.Title FROM ContentVersion C WHERE ContentDocumentId IN (SELECT ContentDocumentId FROM ContentWorkspaceDoc WHERE ContentWorkSpaceId='".LIBRARY_ID."')" which gives me a big list of files in the library with Id…
Brooks
  • 2,082
  • 2
  • 18
  • 26
0
votes
1 answer

governor limits with reports in SFDC

We have a business requirement to show a cost summary for all our projects in a single table. In order to tabulate these costs we have to query through all the client tasks, regions, job roles, pay rates, cost tables, deliverables, efforts, and hour…
micahhoover
  • 2,101
  • 8
  • 33
  • 53
0
votes
1 answer

how to update the subquery fields ? salesforce, soql, apex

Here is the query which will get me all the contacts have HD quality orders. `Orderc__c[] orders = [SELECT id,customer__c, Customer__r.Number_of_HD_Orders__c,` `Quality_Code__c FROM Orderc__c where Quality_Code__c='HD'];` then I change use these…
Lee Fang
  • 51
  • 5
  • 11
-1
votes
1 answer

SalesforceSharp No such column 'COMPLETEDDATETIME' on entity 'Task' error

Using SalesforceSharp in my app and running across this weird issue. I get the following error on a standard field "No such column 'COMPLETEDDATETIME' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after…
K Haze
  • 1
  • 1