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

SalesForce SOQL Query Users

We are using Jitterbit to sync user between SalesForce and NetSuite, we are doing this with an endpoint that takes in the query parameters of Id which is working but i also want to sync all users if the url query parameter is not present. The reason…
Travis
  • 2,185
  • 7
  • 27
  • 42
0
votes
2 answers

Get All users with UserRoleID

I am trying to fetch all users of a role and add their email into a string[] i have some syntax. Error:"common.apex.runtime.impl.ExecutionException: Attempt to de-reference a null object"|0x2f253344 My Code. String[] s; for (User a :…
Shanker Paudel
  • 740
  • 1
  • 9
  • 21
0
votes
1 answer

Update Parent Standard Object Getting Sum Value from Child in APEX

I am new in Apex. I want to write a trigger in apex for before insert. I have two standard objects (Contact, Opportunity). SELECT sum(amount), Bussiness__c FROM opportunity WHERE stagename='Closed Won' and id='006i000000Kt683AAB' GROUP BY …
ABDUL ROUF
  • 33
  • 1
  • 4
0
votes
1 answer

org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required (CloudConnect Salesforce sample ETL SOQL validation error)

SOQLvalidation threw validation error in CloudConnect Salesforce sample ETL. org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required Data retrieve target Salesforce organization uses custom domain. I would like to know what caused…
Yuya Kobayashi
  • 465
  • 1
  • 4
  • 15
0
votes
2 answers

how to update a column in force.com explorer

SELECT Name, ProfileId, Id, Username FROM User this is the select query to retrive data in Force.com explorer Now I wan't to update a column how can I do this? update key word it self not working here please give the solution for this. thanks in…
Balu
  • 43
  • 2
  • 9
0
votes
1 answer

Apex Dynamic SOQL date binding + days

I am able to evaluate today's date using: String timeframe = DateTime.newInstance(Date.today(), Time.newInstance(0, 0, 0, 0)).format('yyyy-dd-MM'); But I need to add days to this. So I want: String timeframe =…
user3403210
  • 1
  • 1
  • 2
0
votes
1 answer

using Sales Force API with C#

I try to use Sales Force API to get some data back. As I found out I can use SOQL instead of SQL that is very similar to SQL. I have a method that is returning some data. I wonder how I can use store procedure instead of using this statement: SOQL…
nikta
  • 79
  • 3
  • 14
0
votes
2 answers

how to query objects lookup relationship and count records?

I have an custom Invoice object with a look-up relationship to Accounts. I'm trying to query the data base to get the total number of invoices of the accounts where Connection_Date__c has a value (Connection_Date__c is a custom field of Accounts…
Chicho
  • 111
  • 1
  • 5
0
votes
2 answers

Salesforce Territory Management: How do I get all accounts for a territory

I want to get all accounts present in a particular territory. Can someone please help me out here to traverse and get the list of all accounts in a territory?
user3188849
  • 1
  • 1
  • 1
0
votes
2 answers

SOQL Join for Account & Contact Data

I use a Query to get all Contacts that were changed in the last "timeframe" like this: SELECT AccountId, Id, Email, FirstName, LastName FROM Contact WHERE LastModifiedDate >= $timeframe I also Need the Account name but for now I only make an…
Salvat
  • 37
  • 1
  • 4
0
votes
1 answer

How to filter a picklist based on the selected value of some other picklist in salesforce

I am creating an android app in which i have integrated the salesforce SDK, in the salesforce custom objects i have two picklist(category__c & sub_category__c) how can i filter sub_category_c based on the selected value of category_c in salesforce.…
Vivek Singh
  • 1,201
  • 3
  • 17
  • 39
0
votes
2 answers

SOQL join between two standard objects

All i want to do is to retrieve information from two standard objects Account and Case. For I have tried joins(which later I found does not work with SOQL), relationships (which does not exist in my case. except for default relationship). Following…
Salik
  • 508
  • 6
  • 17
  • 35
0
votes
3 answers

How to query all task which are having relatedto(whatId) as Account or Contact

I am using an soql query to get tasks. My requirement is to get all tasks which are related account or contact object. Also few other fields inside Account or contact object whichever the object related. Is there a simple way instead of writing…
Shebin Mathew
  • 320
  • 1
  • 7
  • 18
0
votes
0 answers

Exception ocurred during loading

Getting NullPointer errors when using CLIq tool for apex data loader, Trying to run following SOQL query pointing to one of our developer sandbox SELECT ID, FirstName, LastName, Email, EmployeeNumber, EmployeeNumber__c, ManagerID, …
magdiel
  • 151
  • 3
0
votes
1 answer

Get Salesforce Accounts between Starting and Ending AccountId SOQL

I have the starting AccountId and Ending AccountId and want to fetch all accounts between them using SOAP Partnet API in Dot Net How can i get this sort of Query to work correctly in SOQL SELECT Id, Name FROM Account WHERE Id >=…
user1573610
  • 43
  • 1
  • 7