Posts

Showing posts with the label query

Salesforce Fact #872 | Query custom label translations

It is possible to query custom label translations using Tooling API and using the object ExternalStringLocalization. Below is a sample query: SELECT Id   ,ExternalStringId   ,ExternalString.Name   ,ExternalString.Value   ,Value   ,Language  FROM ExternalStringLocalization  ORDER BY ExternalString.MasterLabel, Language Reference:  https://salesforce.stackexchange.com/questions/357686/can-i-query-for-custom-label-translationshttps://salesforce.stackexchange.com/questions/357686/can-i-query-for-custom-label-translations

Salesforce Fact #771 | Query OpenID configuration

How to query the OpenID connect configuration for the org? We can use the below endpoint to query the same: https://<MyDomainName>.my.salesforce.com/. well-known/openid-configuration Reference:  https://help.salesforce.com/s/articleView?id=sf.remoteaccess_using_openid_discovery_endpoint.htm&type=5

Salesforce Fact #684 | Transaction security policy for query

Image
Suppose we want to restrict all the users from querying and extracting data from the Account object. We can create a transaction security policy on the API event for the same. Attached are the screenshots.

Salesforce Fact #6 | Id not needed

Considering the below query returns result, do you think is there any error: Account a = [SELECT Name FROM Account LIMIT 1]; System.debug(a.Id); You might think that a.Id will generate an error as Id field is not fetched in the SOQL query. But the thing is, ID field is implicitly returned in case of SOQL query result. So the above query is interpreted as: Account a = [SELECT Id, Name FROM Account LIMIT 1]; Hence, we need not specify Id field explicitly in the SOQL query unless we are doing some kind of existence check like: List<Account> accList = [SELECT Id FROM Account WHERE Name=<inputname>];