soql's questions - English 1answer

3.800 soql questions.

So here's the scenario. A user (lets call him John Doe) un-deleted the Cases records from the Recycle Bin and now they are back in the system along with current Case records. I need to delete them ...

I'm using Salesforce Mobile SDK for Android for a native application. I'm having trouble accessing JSONObjects from a JSONArray. It seems that the JSONArray returned from my SmartStore object's query ...

Can we write SOQL query to fetch set the records which are in Trigger.New in before trigger

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 ...

The SOQL toLabel function doesn't work in my @AuraEnabled method when called from a Lightning component. UserInfo.getLanguage returns "fi" (for Finnish) but the Record Type Name field that's supposed ...

Visualforce page <apex:variable value="{!record.Reservation__c}" var="Client"> <p align="left" > full {!Client.Name} <br/> address{!Client....

Fetch empty text value of type external id using SOQL query in apex. I am using this query : Select id,name,CommentBody__c,CommentId__c,ParentId__c from Case_Comment__c where ParentId__c =:caseObj....

In Knowledge Article, we getting all description about knowledge article by using "KnowledgeArticleVersion" but this API is not return rating of the article also likes and viewing the score. If ...

I have implemented a searchable drop-down using jquery and visual force. Whenever I start typing a string it will search the database and bring all the matched users. I am using a jquery to call a ...

In my apex code I want to retrieve a campaignMember with a given email. The query [SELECT status FROM campaignMember WHERE email = :emailVar]; Returns the problem message No such column email ...

Background I have this Apex SOQL query: myMap = new Map<Id, AggregateResult>([SELECT OpportunityLineItemId, MIN(ScheduleDate) Starts ...

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 ...

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 am getting the subjected error while executing an update on an Apex class. Basically I am trying to update a Decimal field and I am getting the error : @AuraEnabled public static void ...

This code recover the exact same account, I thought there could be differences with the way it ask the database ... Seems not to be the way it works, So an idea ? public static void ...

I have a query I've written for the Organization/Account object SELECT ID, Name, BillingStreet, BillingCity, BillingState, BillingPostalCode, County__c, Phone, ParentId FROM Account This ...

I read questions to try to speed up visualforce pages, using transient variables and what not and render certain things with javascript(which I am unfamiliar with). After declaring my variables ...

My situation is this: I have a custom object that has two custom text fields I need. Name of a list and client Id. Each client Id can be a part of more than one list. I then need to take this ...

I'm working with class tests, I'm trying to use best practises so I got : - one class I want to test - one class for testing I got a problem when inserting my datas : @testSetup creates Accounts, and ...

I'm getting Invalid date/time: 2018-09-18T16:57:37Z in the developer console. please help me with this DateTime dt = Datetime.now().addMinutes(-10); String formatedDt = dt.formatGMT('yyyy-MM-dd\...

I am required to retrieve all the records (including archived and deleted records) from a Salesforce object. I understand that this can be achieved using queryAll(). However, I have an environment ...

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 ...

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 need to change OwnerId of created record to Queue Id, if the record is created not by User from this Queue. If creator is from this Queue, just leave our OwnerId field unchanged. How can I do that? ...

I am sending a JSON to httpRequest(POST) and getting a response. But, I have Quote object and quoteLineItems List combined using WrapperClass. Quote Object has contacts too. I need to insert contact ...

I have a custom report which i need to build on visual force page which is displayed on a force.com site. I have to display count() of records on a custom object which has more than 500k records. I am ...

Following query won't work if number of records is more than 50,000. Integer c = [SELECT COUNT() FROM MyObj__C]; Is there a workaround to do calculation anyway?

I created a Text Area field in Custom Metadata and I'm trying to SOQL that field but I get NULL. List<CustomMtd__mdt> customMtdList = [SELECT textAreaField__c FROM CustomMtd__mdt LIMIT 1]; ...

According to the Salesforce documentation on ContentDocument Users (including users with the “View All Data” permission) can only query files they have access I find this very strange. Why would a ...

We already have a soql query to retrieve the User object (which returns the role id and profile id) was wondering if we could retrieve the RoleName and ProfileName from within the same query instead ...

I have 2 fields, Email__c and Named_User__c.. I want to select the email, without the duplicates.. for example : test@gmail.com | Albert test@gmail.com | John test@gmail.com | ...

When submitting a SOQL query in the Dev Console using the Tooling API only one result row shows, even though more overall rows are returned, as confirmed by the "Query Results" notice above the ...

We are migrating from salesforce to another system. We need to build field dependencies for dependent picklist fields in salesforce in the new system as well. Can we extract field dependencies from ...

I am writing a SOQL generator that grabs the list of readable fields for an object and creates a query to fetch the data. (Unrelated, but because "Why?" is often asked - this subroutine is part of a ...

I am trying to query a record for its list of File Id's from its related list. Here is the query I am using: List<Example__c> objects = [SELECT Id, (SELECT ContentDocumentId FROM ...

I have an aggregate function in the below SOQL query, this query is executed with this method Database.countQuery(), I only have 32000 rows but the error says I am getting 50001 rows. SELECT COUNT() ...

I am trying to query CaseArticle object. In the following code I am not able to see any value getting populated in caseArt List. When i run the query in editor I am able to see the values. Can any one ...

I have a Description field of type Long Text Area. I'm trying to get the first few lines to display. 1. I tried creating a formula field LEFT(Description, 500) I get Error: You referenced an ...

I came across something weird, SOQL which has a filter as cross-Object picklist field doesn't return rows, even if records exist. Minimum viable code to replicate: Create a new custom metadata type, ...

I want to display the oldest record in my custom object “Application” With a query I can grab the oldest record to the position “Entry": SELECT Id, Name, Date_Applied__c FROM Application__c WHERE ...

SOQL: Count number of child records

2 answers, 19.453 views soql
This is a basic SOQL question. I have a number of Application (custom) objects that are children to the User (standard) object. I want to count the number of Applications associated with each User. ...

i have a problem with populating field with data from different Object. I tried something like this, but it say "Incompatible types since an instance of Schema.SObjectField is never an instance of ...

I want to update a field on the related contacts of a campaign with a field of the related campaign when the campaing is updated. I can get the contactid trough CampaignMembers but how do I get the ...

I want to export the records from Opportunity where Stage is not in "Approve" and its Notes And Attachments with Name contains "XYZ". I don't see any option to fetch Notes and Attachments in Reports. ...

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 ...

Unable to find any documentation on obtaining the logged in User's Id from the Salesforce Mobile SDK for React Native. In apex the following would work: select Id, username from User where Id = :...

Objects: Account Contact Related Account Relationships: Lookup between Account and Contact Master detail between Account and Related Account object. Now, if I check a checkbox "checkbox1__c" on ...

Maybe very trivial question but I don't know the answer. When I create a new field , I always think why don't I give the max length for this field? How does 20 is different from giving 100 as length. ...

I am trying to create a rollup field using the DLRS tool. However, I am running into multiple problems. Ideally, I would like to have my field find the most recent activity date and return the ...

JSON from nested query

1 answers, 949 views soql json
I've got this query: SELECT name, (SELECT From__c, To__c FROM Trip__r) FROM Account limit 1 [ { "attributes" : { "type" : "Account", "url" : "/services/data/v29.0/sobjects/Account/...

Related tags

Hot questions

Language

Popular Tags