You need to sign in to do that
Don't have an account?
Nick Valeriote
Workbench Query for Multiple Related Objects
Hi SF Community!
I'm looking to create a SOSL or SOQL query in Workbench based on the following:
- I have 3 custom objects that are related - Projects (parent), Tasks (child to projects), and timesheets (child to projects and tasks).
- I want to create a query that pulls all of the above records based on a project created date less than June 30, 2013, and a task created date or timesheet created date greater than June 30, 2013.
I'm not a developer, but have managed to create some very basic SOQL queries in workbench. Not sure how to do this one though. I'm using Workbench so I can export the results.
Thanks!
Nick
I'm looking to create a SOSL or SOQL query in Workbench based on the following:
- I have 3 custom objects that are related - Projects (parent), Tasks (child to projects), and timesheets (child to projects and tasks).
- I want to create a query that pulls all of the above records based on a project created date less than June 30, 2013, and a task created date or timesheet created date greater than June 30, 2013.
I'm not a developer, but have managed to create some very basic SOQL queries in workbench. Not sure how to do this one though. I'm using Workbench so I can export the results.
Thanks!
Nick
If you are not a developer, the best option is to create a report (very limited for the the result on screen) and export the results ("unlimited" number of rows) but there is also a solution with a SOQL query even if the query timeout is a big constraint.
The most easy way for this SOQL query is to start with the "last" child (here the timesheets) and you get all the parent values using the relationships (a cross-object SOQL query ("upwards"))
For a custom object: the relationship name is <object name>__r and you chain these relationships "upwards" the parents.
SELECT CreatedDate, task__r.CreatedDate , task__r.field1__c, task__r.project__r.field2__c, task__r.project__r.CreatedDate
FROM timesheet__c
WHERE CreatedDate > 2013-06-30T00:00:00-00:00
The workbench doesn't work well when you want to export the result of a cross-object SOQL query in csv (forbidden by the tool or empty columns as results) I never use the workbench for these cross-object SOQL queries.
I use the dataloader (this tool can export data with cross-object SOQL queries (not in bulk mode))
The dataloader is the official tool of Salesforce. The workbench is not a supported tool by Salesforce.
All Answers
If you are not a developer, the best option is to create a report (very limited for the the result on screen) and export the results ("unlimited" number of rows) but there is also a solution with a SOQL query even if the query timeout is a big constraint.
The most easy way for this SOQL query is to start with the "last" child (here the timesheets) and you get all the parent values using the relationships (a cross-object SOQL query ("upwards"))
For a custom object: the relationship name is <object name>__r and you chain these relationships "upwards" the parents.
SELECT CreatedDate, task__r.CreatedDate , task__r.field1__c, task__r.project__r.field2__c, task__r.project__r.CreatedDate
FROM timesheet__c
WHERE CreatedDate > 2013-06-30T00:00:00-00:00
The workbench doesn't work well when you want to export the result of a cross-object SOQL query in csv (forbidden by the tool or empty columns as results) I never use the workbench for these cross-object SOQL queries.
I use the dataloader (this tool can export data with cross-object SOQL queries (not in bulk mode))
The dataloader is the official tool of Salesforce. The workbench is not a supported tool by Salesforce.
ITIBihar Aapda Rahat Kosh | Badh Raahat Bihar Online | 6000 Badh Rahat List | बिहार फसल छती-पूर्ति | किसान राहत 6000 रुपय सूचि @aapda bih nic in
This is a scheme run by the central government in the interest of farmers, under this scheme ₹ 6000 is deposited directly into the bank account in three installments per year.
How to register in PM Kisan Yojana
You can register in PM Kisan Yojana by visiting the website of the official of Agriculture Department or the official website of PM Kisan of the Central Government.
Where to check PM Kisan Status
The farmer who is already registered and is taking benefit of PM Kisan can visit the official website of PM Kisan and click on Beneficiary Status to check all the installations of PM Kisan
What are the important papers in PM Kisan
Important documents in PM Kisan are Aadhar card and land document
NIMI Question Bank (https://ncvtmisportal.in/nimi-question-bank-pdf-download/) , ITI Syllabus (https://ncvtmisportal.in/iti-syllabus-download/) , ITI Result (https://ncvtmisportal.in/ncvt-iti-result/) , NIMI Mock Test (https://ncvtmisportal.in/iti-nimi-mock-test-all-trades/) .