Posts

Showing posts from October, 2025

Salesforce Fact #954 | Transaction Security Policy on LoginAs event

Image
Sometimes we want the login as option to be restricted for one particular user like the integration user or deployment user in the org. We can create a transaction security policy on LoginAs event to impose the same. Note: The user Id should be 15 digit Id in the condition Attached is the screenshot.

Salesforce Fact #953 | Limit error in Get Records while using IN operator

Image
We need to be careful while using the IN operator in Get Records element in record-triggered flow. If the text collection is empty, it seems Salesforce runs a query to fetch all the records of that sobject and the number of query rows are counted in the governor limit. So, if the total number of records for that sobject is more than 50000, it throws limit error. Fix would be to always check if the collection is empty or not, before using it in the IN operation. In this example, varIds is an empty text collection used in IN operation to fetch the account records. However, the number of query rows returned is 136 instead of 0, which is the total number of account records in the org. Attached are the screenshots.

Salesforce Fact #952 | Delete debug level

Steps to delete debug level: Go to classic -> setup -> Under Monitor -> Logs -> Debug levels -> select the debug level -> delete. Reference:  https://stackoverflow.com/questions/73911362/salesforce-debug-levels-need-to-edit-or-delete-existing-level

Salesforce Fact #951 | Sum of value of selected records in screen flow datatable

Image
Suppose we have a datatable in screen flow and we would like to show the sum of some numeric field of the selected records. We can use screen action and transform element to get the results. In this example, we are getting the sum of the Numberofemployees of the selected account records. Attached are the screenshots.

Salesforce Fact #950 | Restricted profile cloning in action

We can use the Restricted Profile Cloning setting to avoid exposing permissions in cloned profiles. For example, suppose we have enabled field service in the org and provided CRED access to Work Order object in a profile. Now, for some reason FSL is disabled in the org. Now, profile is cloned and after cloning, the FSL is again enabled in the org. If Restricted profile cloning is enabled, the Work Order object would have no access in the cloned profile. Steps to enable : Setup -> User Management Settings -> enable the toggle for Restricted Profile Cloning. Reference:  https://help.salesforce.com/s/articleView?id=platform.users_restricted_profile_cloning.htm&type=5