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

System.LimitException: Too many query rows: 50001 error in trigger

i have soql in Apex trigger where as it is fetching the all the records of test object. SOQl is fetching more than 50000 records so when ever i am updating the records i am facing this governor limits error . please let me know how to solve this…
saru
  • 1
  • 2
  • 10
0
votes
1 answer

SOQL statement joining 2 objects

Having issues retrieving data from 2 different SF objects, a custom object and the accounts object. There is also a field in the Contact object, but first i'm trying to tackle Jobs DB and Account object. Here is the query without the…
ASaxe
  • 23
  • 4
0
votes
1 answer

set integer value to specific stagenames

How, in SOQL, would I assign a 0 or 1 integer value to specific string values. Something like this, but taken out of Java pseudo-code and turned into SOQL: if (stageName.equals(review) || stageName.equals(declined) { return 0; } else if…
0
votes
1 answer

Adobe Air Salesforce get details using id field

I am having a problem using Adobe Air to get contact information. If I import the contacts from Saleforce all I get is the Id of the Account to which they belong. How do I convert this Id to the Account Name. There are similar problems with other…
Roy
  • 21
  • 1
0
votes
1 answer

Getting names, based on date and user

I am new to SQL (in Salesforce) and I have some problems with a query. I want to get the customer of the last sold item, for each user. (“John’s last sale was to customer Jane”). We have built everything around the Opportunity object. If the…
0
votes
2 answers

Access sales force object list without authentication

I have an salesforce object stores which needs to be accessed by all users(logged-in and guest users). I tried in "user profiles" but later realized its only for userd logged into the system that can have profile. So what about guest users? how do…
Uday Reddy
  • 1,337
  • 3
  • 16
  • 38
0
votes
1 answer

Nforce nodejs salesforce search not working

I followed nforce link to search for objects like this var selectQuery = "SELECT Name FROM Account Name = 'Spiffy Cleaners'"; org.query({ query: selectQuery, oauth: oauth}, function(err, resp){ if(err) { console.log(err); } }); I keep…
Uday Reddy
  • 1,337
  • 3
  • 16
  • 38
0
votes
1 answer

Salesforce API is returning only 500 rows when queried via SOQL using Python

I am working on a Python Script to get the data out from sales force. Everything seems to be working fine I am passing a custom SOQL query to get the data but the challenge is that query is returning only the first 500 rows but there are close to…
0
votes
1 answer

Salesforce SOQL Trimming the field

I am callling the SOQL query through REST API from php. I am searching for the phone number using the below SOQL query. I want to trim the mobilephone in where clause. I tried MobilePhone.trim() and trim(MobilePhone) it's not working. How can I…
Arav
  • 4,957
  • 23
  • 77
  • 123
0
votes
1 answer

Construct URL for Socrate dataset query where date is greater than a date

This question has been asked but not in the Swift context. I have a Socrata dataset I am retrieving using an OS X Swift app with a query like this: https://data.cityofwestsacramento.org/resource/wdus-j2nt.json?$where=date_applied>=2016-05-01 It…
user773881
  • 845
  • 1
  • 8
  • 10
0
votes
2 answers

SOQL query in SFDC using simple salesforce (python)

I am trying to query sfdc using a datetime, I tried using the date as a string, then as a datetime object, but I get malformed query for using it like this dateTime = sys.argv[1] result = sf.query("select Case__r.CaseNumber from File_Attachment__c…
nkshirsa
  • 11
  • 3
0
votes
1 answer

How can I refer to converted Lead information?

I have created a Custom Button as below: Display Type: List Button Behaviour: Display in existing window wihtout sidebar or header Content: URL Details: ../a02/e? &00N2800000AaCYu={!Opportunity.Id} &CF00N2800000BHtdT={!Opportunity.Name}…
Barsham
  • 749
  • 8
  • 30
0
votes
4 answers

How to fetch list of all fields in a table in Salesforce?

Is there a way to fetch a list of all fields in a table in Salesforce? Below is SQL statement which I am using to get all the column from that particular table: SELECT * FROM myTableName;
Rahul Singh
  • 11
  • 1
  • 7
0
votes
1 answer

Unable to access SFDC User Objects "EmailPreferencesAutoBcc" entity from SOQL/SOAP interface

The entity "EmailPreferencesAutoBcc" is accessible via Tableau connection to SFDC and the entity is a standard entity for User object. When Accessed via SOQL on SOAP interface the following Error is throw. No such column 'EmailPreferencesAutoBcc' on…
sajet
  • 43
  • 3
0
votes
1 answer

SalesForce SOQL join Leads to Contact

I'm trying to query data out of SalesForce Lead using SOQL and JOIN and obtain contact information where for the Lead Created through the contacts object. I'm not sure which objects to use how to go about doing it. Does anyone know of a detail…
codeBarer
  • 2,238
  • 7
  • 44
  • 75