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
-1
votes
1 answer

How to fetch over 20000 records from socrata using Http rest call

I am fetching records from a private socrata data set using the http restcall string searchCondition = "resource/xxxx-xxxx.json?$where=column1='something'AND column2='something'&$limit=25000"; response =…
Nachikethas
  • 43
  • 1
  • 8
-1
votes
1 answer

Datetime conversions to timestamp

I'm trying to write some code that will filter records from SalesForce that have a value in a field that is not before now. I have given up on trying to format a query that filters the results from SalesForce because not I have tried works and…
Daniel Dow
  • 487
  • 1
  • 7
  • 20
-1
votes
1 answer

SOQL date in week where clause

I have a custom object with a Date field and I was wondering how you could query that object if that date field is within the current week (given that the week starts on Sunday and ends on Saturday). I was thinking of creating two functions that…
Ryan Sayles
  • 3,389
  • 11
  • 56
  • 79
-1
votes
1 answer

SQL query or logic to implement search result

I have a text box and search button same as stackoverflow, I have a field in database "Title", Now i want a sql query or some kind of logic which actually filter the string from "Title" field. Eg. if I type "Stackoverflow is good website" in a…
-1
votes
1 answer

c# dynamic query string Issue

I want to save a query as a string with "variable-name" in a file as - SELECT Id FROM Object WHERE name = "+ VARIABLE_NAME + " and want to execute query like - public void executeQuery(String VARIABLE_NAME) { String query = ReadQuery(); // some…
-1
votes
1 answer

Divide results of two SOQL queries

I have two SOQL queries that access data from Salesforce that I want to divide. On their own each query works, and I want to divide their results by one another, but I am unsure how. This is what I have tried: select (select count(success__c) from…
Alex Kuhar
  • 11
  • 4
-2
votes
1 answer

I want to change opportunity.createdby to lead.ownerid,rectify my code

I want to change opportunity.CreatedById to lead.ownerid,rectify my code trigger on opportunity(after insert) lst opps=[select opportunityId,CreatedById from opportunity where opportunityId IN :…
-2
votes
1 answer

How to get a SOQL query out of a for loop

Code added. I have searched endlessly for a solution here and cannot find one, please help! I have three objects (A, B, and C). A has a lookup to B, and B is the master to C (detail). Both A and C have many records related to each B record. I…
excelDvelop
  • 3
  • 1
  • 3
-2
votes
2 answers

What is the difference between SQL and SOQL?

Can any one explain the difference between SQL(Structured Query Language) and SOQL(Salesforce Object Query Language)? I need to convert dynamic SQL query into SOQL query using C#. Did anyone have any idea please help me... Sample Inner Join…
-2
votes
1 answer

How to convert SOQL query to SQL query?

I am working on SQL query, I have pre-created SOQL query, I am looking for a way to convert it to SQL query. The query is: SELECT CronJobDetail.Name, Id, CreatedDate, State FROM CronTrigger WHERE CronjobDetail.JobType = 'bla bla' AND…
Gökhan Akduğan
  • 533
  • 1
  • 8
  • 17
-2
votes
1 answer

"CONTACT" record should be CONVERT back to the "LEAD" record when ACCOUNT NAME in contact is deleted

Whenever the Account on Contact record changes, the contact should be converted back to a Lead. I have mapping fields from contact to lead. Is this possible ? How to achieve this ? I'm trying to do it by writing a trigger: trigger insertLead on…
-3
votes
1 answer

soql query to get the Account id and name which have related opportunities whose status is either close won/Close lost

SELECT AccountId, Account.name FROM Opportunity WHERE StageName LIKE '%Closed%' I seek a query that works the same but should be called "From Account". Also that returns records that have null as their name or AccountId.
Harsh Verma
  • 1
  • 1
  • 1
-3
votes
1 answer

I'm new in Salesforce and have question regarding SOQL Query in salesforce

Write a SOQL query to fetch Contacts from Account using record Id.
user44323
  • 1
  • 1
1 2 3
49
50