Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 72832

Salesforce Object Query Language (SOQL), modeled on SQL, for accessing information saved in the Salesforce database.

1 vote

Using List Collection SOQL Value "variable does not exist"

It looks like you expect one record in your query, but you're storing it in a list? https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_list.htm Since it's …
Kris Goncalves's user avatar
3 votes

looking to query the sfdc metadata and determine if there are any workflows, validation rule...

Going off what David said, the easier part is that it can limit how much you manually go through, but the important thing is you'll need some analysis in each type to figure out if there's action need …
Kris Goncalves's user avatar
2 votes

FieldPermissions not getting proper results

The query is returning field permissions for email across all objects as you have not specified an SobjectType in the query. The documentation takes special note of this: Include the field’s parent o …
Kris Goncalves's user avatar
1 vote
Accepted

Incorrect result for ContentDocumentLink query

You can see my same question here, but I had to create a Salesforce support case to resolve it. They enable some permission on their end to allow queries with greater than 2,000 records in the LinkedE …
Kris Goncalves's user avatar
1 vote
Accepted

How to create a query that returns only cases on the platform that have more than 10 years s...

You want cases with a CreatedDate that is longer than 10 years ago. LAST_N_YEARS is defined as Starts 00:00:00 on January 1 of the previous year and continues through the end of December 31 of the pr …
Kris Goncalves's user avatar
4 votes
Accepted

If the dates in the sorted field are the same, how are they sorted?

In the documentation for ORDER BY There’s no guarantee of the order of results unless you use an ORDER BY clause in a query. And even if you use ORDER BY, the order of results can vary if there are d …
Kris Goncalves's user avatar
1 vote

Tooling API - UserFieldAccess - Receiving UNKNOWN_EXCEPTION error

I was able to reproduce it, with the same stacktrace error Id, and noted the following behavior: An error is thrown when using the 18-digit FieldDefinition Id for your custom field within DurableId T …
Kris Goncalves's user avatar
1 vote

SQUERY SALESFORCE

It's tough to know what you're trying to achieve. Based on what you posted, I assume the criteria you're trying to get is: WHERE Account_Fund_Ratings__c != NULL AND Source__c = 'On Panel' AND Sourc …
Kris Goncalves's user avatar
2 votes

Is there a flag or a way to know than an Account is a result of merged accounts?

@Himanshu's answer is what you're looking for if you're just needing an easy flag/field on account to denote it's been through a merge. I did want to correct what you noted. The entry you see in the U …
Kris Goncalves's user avatar
2 votes
Accepted

VisualForce Page displaying ID from Soql query instead of field value

First thing, I noticed you're using "lead__c" in your query? This should be a standard object so it should simply be "lead". Assuming your query works, your query is returning a list of Leads that ac …
Kris Goncalves's user avatar
1 vote
Accepted

Content Version SOQL - WIth custom field in the Where clause Return as null

The following is mentioned in the docs for ContentVersion Note: Depending on how files are shared, queries on ContentDocument and ContentVersion without specifying an ID won't return all files a user …
Kris Goncalves's user avatar
1 vote
Accepted

SOQL select archived product2 records

Where are you running this from? I see copado in the error description. Your query looks fine and will work. You can test if it works by doing it in: anonymous apex workbench (select include for "de …
Kris Goncalves's user avatar
1 vote
Accepted

Cannot download FieldDefinition data for Contact object

It's confusing based on the naming, but if you look closer at FieldDefinition, you'll see that EntityDefinitionId is: The durable ID for the object defined in the EntityDefinition field. In EntityDe …
Kris Goncalves's user avatar
1 vote

Help with Apex test class for a SOQL select method

It's good that you're asking the right questions when it comes to testing. Tests are only as useful as you make them - especially when you start thinking beyond code coverage numbers. Code coverage sh …
Kris Goncalves's user avatar
4 votes

How to troubleshoot Exception thrown when using WITH SECURITY_ENFORCED

I'd recommend using the stripInaccessible method to figure out exactly what field isn't accessible. Change your query to not use WITH SECURITY ENFORCED and pass the query into the stripInaccessible me …
Kris Goncalves's user avatar

15 30 50 per page