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

Talend - tSalesforceInput component only returns null results on Custom Objects

I am using Talend to extract data from Salesforce, but no matter what i try, when i try to pull data from a custom object, all i ever get is a null value. I am using Talend 6.1, and the version of salesforce is 33. I have created a simple…
monkeyb33f
  • 55
  • 1
  • 11
0
votes
1 answer

How to get account and contact of a particular case using soql query in salesforce?

I want to show accounts and contacts data of a particular case in a form. how can i query the same using soql query in salesforce. I have a custom object named Work_Order__c which is having a master-detail relationship with CASE object. I am trying…
Ejaz
  • 131
  • 7
0
votes
0 answers

Populate lookup field in Salesforce

I have created a new custom object in Salesforce with one of the fields called Contact being a vlookup to the Contacts object. I am using SQL via the Devart Salesforce adapter to create records in the new Requests object but am not sure what to…
0
votes
1 answer

Salesforce append __r error (join 3 tables)

I have three tables : Opportunity_Buy__c, Campaign__c, Internal_Line_Item__c and I am trying to join them on salesforce. The relationships (join on) will be : Opportunity_Buy__c.AAAAA = Campaign__r.AAAAA, Internal_Line_Item__r.OpportunityBuy__c =…
Datacrawler
  • 2,780
  • 8
  • 46
  • 100
0
votes
1 answer

SOQL, Salesforce - Join Two objects with two where clauses

I have two objects named as 'Opportunity' and 'Account. I need to select ID, OpportunityName,CreatedDate from Opportunity table and AccountName, AccountCat from Account table where Account.OpportunityID = Opportunity.ID and AccountCat = 'DC'. I…
Chanuka Ranaba
  • 635
  • 3
  • 12
  • 24
0
votes
1 answer

Using SOQL query to look up an item by id

I have a visual force page that needs to return the name of a property location to be loaded into the input field on page load. (I click edit and the name is already there when page loads. See screenshot of original before I started making a cusome…
Nicole Phillips
  • 753
  • 1
  • 18
  • 41
0
votes
1 answer

soql in java to fetch the deleted records

I have a scenario where I would like to fetch all the deleted records at salesforce end and send to UI using java. I tried with the following SOQL: SELECT Id, IsDeleted, CreatedDate, LastModifiedDate FROM Note ALL ROWS I end up with response as: […
David Sam
  • 59
  • 9
0
votes
2 answers

How can i merge two different queries using "Salesforce Object Query Language (SOQL)"?

Currently am making two calls to salesforce API to fetch the data, below are the two queries: 1>SELECT PermissionSetAssignment.AssigneeId,PermissionSetAssignment.PermissionSet.Name FROM PermissionSetAssignment where…
0
votes
1 answer

How to do a nested query in SOQL? Salesforce

I have 2 custom objects in Salesforce.com One is PersonAccount and one is Accounts. Within the default "Account" object I have a field called user_id PersonAccount acts as a junction table to link "Account" to Accounts PersonAccount does a lookup…
willxj
  • 43
  • 1
  • 7
0
votes
1 answer

Query with range returning empty

I'm building a simple query to recover some data based on the creation date of the record: function buildQuery(startDate, endDate) { var start_date = formattedDate(startDate); //YYYY-MM-DD var end_date = formattedDate(endDate); …
pceccon
  • 9,379
  • 26
  • 82
  • 158
0
votes
1 answer

Salesforce REST API SOQL get account for opportunies

I want to do a query for all my opportunities (or contacts or whatever) and then join in the account so I can get the name etc. I'm able to get it to work querying accounts and joining the opportunities, but not the other way around. select Name,…
Cocoa Nub
  • 489
  • 7
  • 20
0
votes
1 answer

Salesforce Trigger Update Error

Hello! I am working on a trigger within Salesforce and I keep encountering an error that I can't seem to solve so I am hoping someone with more experience can help me get back on track. I've hunted around on Google and messed with the structure of…
Michael H.
  • 47
  • 1
  • 10
0
votes
1 answer

Salesforce:- How to assign Page Layout of an Object (Standard or Custom ) to Profile via SOQL

How to assign Page Layout of an Object (Standard or Custom ) to Profile via SOQL Is that possible? Note:- I know how to do that via SFDC UI. I would like to automate this assignment.
harrybvp
  • 2,445
  • 2
  • 22
  • 30
0
votes
1 answer

Salesforce SOQL - find account by contact email

I am using PHP and SOQL to query Salesforce. I am trying to find the account by the email address of one of the contacts. So far I have this: SELECT Id, Name, (SELECT Id, Name FROM Contacts WHERE Email = 'joe@schmoe.com') FROM Account But it…
Greg Holmes
  • 141
  • 13
0
votes
1 answer

Giving error unexpected token: 'where' at line 13 column 281

I am getting this error unexpected token: 'where' at line 13 column 281 public with sharing class Form_Salgsplakat_Bilpris { dealer__Vehicle_Inventory__c vi =new dealer__Vehicle_Inventory__c(); public dealer__Vehicle_Inventory__c getvi() { …
Shantanu Mahajan
  • 199
  • 1
  • 2
  • 14