soql's questions - English 1answer

3.686 soql questions.

How can I query the user id/id's of the Partner User belonging to the Partner Account? Can you provide me with the approach/sample. I have a below query that fetches the id of the Partner Account ...

Is it possible to get field value by SOQL query only if has some specific value or type? Following example query: SELECT Id, License.Name FROM PermissionSet returns permission sets with field ...

I need to display time retrieved from a dynamic SOQL and display at visualforce page using remoteaction. As we know code runs in system context and values in UTC time zone are retrieved. Is there ...

Can we make a check on WHERE clause of a SOQL query for comparing 2 date fields availability? My requirement is, I want to get the response from query based on data availability on two different ...

I'm having issues returning results from a query of the Partner object. I have a trigger written on a custom object that is the child object which has a look-up to the Account object. Ideally I'd like ...

I am digging around trying to figure out what sort of options we have to trigger an event when someone executes the Email Quote standard action on the Quote object. I poked around the child ...

I'm trying to get a list (and ultimately the ContactIds) of Contact Roles associated with an Opportunity in an after-update trigger, but the size of this list is always 0, even when there are Contact ...

We are using Mule to integrate data to Salesforce and then return the Salesforce Id. If we insert 1500 new records they are created in Salesforce successfully. However, when we try to retrieve the ...

Cannot figure out the relationship name for Default Opportunity Team on User. List<User> users = [select id, name, // default opportunity team (select id, TeamMemberRole, ...

First off, I am not sure how to properly refer to this type of SOQL query. I am working on a batch process and this is the step where you build the query. What I am having trouble with is putting in ...

I need to pull out a query that fetches: From My Team object and Package object. Package is a child of Teams From teams I need to pull how many packages is currently in teams and how much each ...

I need to do a query in the database, the idea is to retrieve at the same time all the object id's and do it in a way you don't touch the limits. Something like: [Select Id from sObject Where Id >...

I've a formula field Named Invoice_per_Account_Gropued__c it contain multiple value comma separated. like value of the field is; A,B,C,D,E. Now i've write soql query on account object to fetch the ...

I am trying to write a SOQL to extract all opportunities that started and ended between a certain date and time. I have two custom date time fields OppStartDateTime and OppEndDateTime.

I’m getting the values from the LiveMessage Session object (When it is an individual query) but when I’m querying it from the Case Object it is showing blank rows (& vice versa).

How to get a recent Approver Name (only Recent Step Approver Name ) from Approval History. I am trying using below SOQL this but no success: SELECT id, p.NodeStatus ,p.ProcessInstance.Status,p....

I'm querying Salesforce data via the SOAP API using the query : SELECT Id, field FROM User Where field IN ('value1', 'value2', ....'value500'). The above does not return any results, despite the ...

My full error message is as follows Error: Compile Error: Method does not exist or incorrect signature: void add(AggregateResult) from the type List at line 21 column 41 I am working on building a ...

I want to attach the existing contact with new user and for that, I'm disabling the inactive record to isolate the contact then creating a new user and attaching it with the existing contact, but when ...

I can not return a custom Apex class from the server side to the client side. Here is the class: public class QuizDataNode { @AuraEnabled public SObject sob {get; set;} @AuraEnabled ...

How would you find what Profiles has selected for the Lightning App Builder pages? tried querying the tooling API but it does not have the profile information, and I'm just wondering is there any ...

Hi Friends i am working on Lightning super badge challenge.I stuck in challenge 7 because The requirement is In addition to sales, you need to automate service. Remove all existing Case Reason ...

EDIT: One thing I forgot to mentioned is that, there is a condition what fields to be added to WHERE clause for an example: Match1 = the where clause should be `emp_name__c, emp_num, emp_code` Match2 ...

I am trying out few Lightning stuff and as a part of that I added namespace to my Developer edition. After doing this I realized that all my preexisting custom object's API name is now prefixed with ...

I am trying to query emailMessage objects related to a custom object. When I try the query in the Developer console query editor it returns results, also works in workbench. However when I use the ...

I have a piece of code in my Apex: List<sObject> assessmentToQuestions = [ SELECT Id, (SELECT Id FROM zced__Assessment_Questions__r) questions FROM zced__Assessment__c ...

I have the following data model: Now I would like to do the following: By knowing zced__Interaction__c extract all the zced__Assessment__c. Then for each of the extracted zced__Assessment__c ...

I have a visual force page where I had to define a look up to Contact. So I used contact.ReportsToId like below <apex:outputLabel value="Select Requestor:" for="requestor"/> <apex:inputField ...

Can anyone help on avoiding nested for loop in the below code: List<Account> leadAccountIds=[Select Id, OwnerId, Name FROM Account WHERE Name LIKE :Liktr]; System.debug('leadAccountIds=' + ...

I'm trying to access the value of object 2(LiveText__Conversation_Header__c) from object 1 (Case) and getting error. Query: SELECT (SELECT LiveText__EndedTime__c FROM ...

I need to fetch orders by account. Since orders are children of account I can use the aggregation query parent-to-child. Query to be used: SELECT Id, (SELECT Id FROM Orders) FROM Account I can ...

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="/soap/ajax/33.0/connection.js" type="text/javascript"></script> <script src="/soap/ajax/33....

Here I'm trying to perform LIKE operation in SOQL when I'm passing a variable dynamically the Query is not returning the results? List<string> companies=new list<string>(); List<...

I have couple of Question on datetime fields. Question 1: How to pass current month beginning date time and ending datetime in Apex Here I setted"July" Month start datetime and end date time ...

I want to get the Users which report to a particular user (A manager) by using the Hierarchical Relationship inside the User Object. Appreciate if someone can give an example. Small clarification: ...

new to apex and visualforce. I am trying to create a visualforce page that displays selected products and their locations for an order. Currently I am able to display the products selected for the ...

I covered this post. There I met the following query: SELECT Name, (SELECT Name FROM Job_Applications__r) FROM Position__c Here is the explanation provided in the post: Note that we have utilized ...

Issue with nested soql query

1 answers, 27 views soql
can anyone could have a look and let me know what is wrong with this query? List projects = [SELECT id, Number_of_Assignments__c, Number_of_billable_assignments__c FROM Project__c ...

As per the article Execution Governors and Limits In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. The row counts from these ...

The limit with regards to rows in a query locator is 50 million. Does using an inner query reduce the number of possible rows? For example: Query for Query Locator: SELECT Id, (SELECT Id FROM Orders)...

I've created a simple Visualfore page and a Apex class to process particular record of Knowledge__kav standard object. Visualforce Page: <apex:page standardController="Knowledge__kav" extensions=...

I am wondering if a summation SOQL query aggregation is faster than adding all values on a regular loop. For example: SOQL query aggregation: SELECT SUM(TotalAmount) FROM Order WHERE AccountId = '...

Problem I'm trying to make a standard query pagination. I'm using SOAP API. The logic is classic: LIMIT recordsByPage OFFSET (recordsByPage*pageNumber)+1, It works fine, however, I'm facing the ...

Is there a way to query all fields on an object that have 'Default Value' ticked (and possibly filled in)? This should include custom fields.

We have a requirement to delete all converted leads whose corresponding contacts have been deleted. Upon implementation we noticed something odd: After creating and converting a lead via UI (classic ...

I am using the toLabel function in an aggregate query, but it doesn't return the translation of the picklist value. I have changed the language of the user to Dutch and executed the following query: ...

Select only fields using SOQL

2 answers, 176 views soql
Is it possible to select only fields using SOQL? I mean to select fields without selecting whole SObjects? For example, is it possible to select a List<Name> of names of accounts, such that ...

Any way to retrieve the CreatedDate of a CustomField using SOQL, Account object has 200 fields out of those i need to check for 60 fields created date

I noticed that SOQL with ORDER BY and NULLS LAST ASC returns results in wrong order (especially when I order by field from relationship). I wonder if it is some kind of bug or I've done some mistake ...

I want to retrieve data categories a role/permission set/profile has access to for all the user roles, profiles and permission sets. Is there an API or an object I can query to retrieve the Data ...

Related tags

Hot questions

Language

Popular Tags