Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

New answers tagged

0 votes

Why am I able to see a lookup record's name field if I don't have access to the record

If your vfp is using a custom controller, then consider using the "with sharing" keyword to potentially circumvent your issue. Another tool to consider could be permission-gating lookup ...
Peter Noges's user avatar
  • 1,130
1 vote
Accepted

SOQL on FieldDefinition object - "LIKE" and "NOT LIKE" Return Same Results?

As per this documentation, the FieldDefinition object Tooling API doesn’t support SOQL operations COUNT(), GROUP BY, LIMIT, LIMIT OFFSET, OR, NOT, and INCLUDES. The unsupported operations for these ...
Tushar Jadav's user avatar
  • 1,880
0 votes

Is there a way to report on attachments?

You might want to consider the declarative roll-up summary tool. https://sfdo-community.github.io/declarative-lookup-rollup-summaries/ You would have to build a roll-up for each object but it would ...
Benjamin Pirih's user avatar
-5 votes

Is there a way to report on attachments?

Hope all of you are doing well! I have developed an app which can help you in getting the required information. This app works for all Custom as well as Standard object. By using this app you can - ...
Sumit's user avatar
  • 1
1 vote

Why does `EntityDefinitionId` works like SObjectType in following code?

Why ... ? We don't know, because the documentation doesn't tell us. Presumably, it's to make our lives easier when performing queries, because we don't have to query CustomObject or EntityDefinition ...
sfdcfox's user avatar
  • 494k
5 votes

How to write SOQL query to get accounts where billing city equals to shipping city in single query?

If the two fields are on the same record, this is approached by using a custom Checkbox formula field to do the comparison, then querying using that Checkbox field. E.g. the field might be ...
Phil W's user avatar
  • 36.7k
0 votes

How to fetch contentNote records as per the contact record?

You can retrieve all Notes for a parent record by querying on ContentDocumentLink and ContentNote objects. A ContentDocumentLink record is created for each ContentNote entry. ContentDocumentId field ...
Cb Shivananda's user avatar
0 votes

how to read all Content Notes saved as 'SNote' (Beta New Notes feature) for a Parent record all users?

You can retrieve all Notes for a parent record by querying on ContentDocumentLink and ContentNote objects. A ContentDocumentLink record is created for each ContentNote entry. ContentDocumentId field ...
Cb Shivananda's user avatar
1 vote

Picklist field returning values instead of API Names in SOQL after Summer '24 release in sandbox

Thanks for raising this - will take a look into it.
Jeremy Westerman's user avatar
2 votes

Does Database.rollback on a savepoint release Select for Update locks

Just in case someone finds this thread while researching the same question, in the Spring '24 release, Salesforce made a change to the behavior of DML when rolling back to savepoints. You can read the ...
silverglass's user avatar
0 votes

Is there a way to report on attachments?

Sharing my bit of knowledge in 2024: Salesforce still partially supports reporting on notes and attachments/files. Reference: https://help.salesforce.com/s/articleView?id=000383957&type=1 You can ...
Asadullah Shaikh's user avatar
10 votes
Accepted

I'm exceeding 50k query rows with a child query, and no exception. Why does this work?

As explained in Apex Governor Limits: In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. These types of queries have a limit of three ...
sfdcfox's user avatar
  • 494k
4 votes

Why SOQL automatically retrieves Owner data, although I don’t specify it in the request?

Salesforce includes certain fields in a query, even when you don't ask for them. As a simple example, consider: Account record = [SELECT Name FROM Account WHERE Id = :someRecordId]; System.debug(...
sfdcfox's user avatar
  • 494k
0 votes

How can I get the user-friendly label for the available permissions?

I had the exact same question. I had no luck with an easy solution but this is what I came up with: PermissionSet maxperms = new PermissionSet( Name = 'MaxsPerm', Label = 'Maxs Perm', ...
MadMax's user avatar
  • 1,000
3 votes
Accepted

fflib: selector Method query giving me error of Duplicate field selected

You have: public List<Opportunity> selectByDynamicFilter(List<String> lstOfSobjectFields,String strFilter, String strRecordId){ fflib_QueryFactory query = newQueryFactory()....
cropredy's user avatar
  • 71.7k
2 votes

fflib: selector Method query giving me error of Duplicate field selected

I would recommend taking this to the Discussions section of the GitHub repo for FFLib (https://github.com/apex-enterprise-patterns/fflib-apex-common/discussions), you'll likely get more framework-...
Morgan Marchese's user avatar
5 votes
Accepted

SOQL "FOR UPDATE" keyword Understanding

As mentioned in Avoiding Deadlocks, Apex does try to avoid deadlocks by locking parents before children, and by record Id order when editing multiple records (e.g. Apex, Data Loader, etc). However, ...
sfdcfox's user avatar
  • 494k
1 vote
Accepted

SOQL write a query to find the 3rd least annualRevenue on account

If you have duplicates I don't think there's an easy way because field 'AnnualRevenue' can not be grouped in a query call Normally I'd try to play with something like this and then capping it with ...
eyescream's user avatar
  • 24.1k

Top 50 recent answers are included