Posts

Salesforce Fact #958 | Exempt from Transaction Security

There is a System permission 'Exempt from Transaction Security' which bypasses the triggering of transaction security policy. It can be added to profile or permission set level and assigned to the intended users. Note: This doesn't apply to LoginEvent type. Reference:  https://help.salesforce.com/s/articleView?id=xcloud.enhanced_transaction_security_exempt.htm&type=5

Salesforce Fact #957 | Password reset of new user using apex

For new users, we can use the System.setPassword() method to set a password and while logging in they would be prompted to set a new password as per the standard salesforce behavior. However, clicking on cancel would bypass that and would login to the org. This is helpful while creating multiple test users in bulk and to have same password for all instead of manually setting it for each user. Reference:  https://salesforce.stackexchange.com/questions/83345/how-do-i-create-a-user-without-asking-them-to-set-their-password

Salesforce Fact #956 | Open another page in same tab in app builder

Image
While using the lightning app builder, we can open another app/home/record record page in same tab. Go to Pages dropdown -> Open Page -> Search for the page you want to open -> select the page -> Open. Attached is the screenshot.

Salesforce Fact #955 | Create inactive user

While creating a new user from UI, the IsActive checkbox is true and cannot be edited. However, while creating users from CSV file or API, we can set the IsActive flag to false to create the users as inactive.

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