This blog contains some of the Salesforce facts which I have found quite interesting. Happy learning.
Salesforce Fact #545 | $UserRole in formula
Get link
Facebook
X
Pinterest
Email
Other Apps
We can use $UserRole global variable in formula field and validation rule to get the role of the current user, Similar to flow. However, the 'ParentRoleId' field is not accessible in formula.
I searched for the importance of the Salesforce Management system. Thanks, admin, for sharing such wonderful content on this topic. Now I have got everything I need about it.
Whenever we are setting any picklist field value to blank, it will get stored in database as NULL. So we need to be careful while processing this data after fetching from database. In this example, we are creating an account in a test method with type as blank, and populating blank using single quotes instead of NULL. Now after we fetch the data from the database it is NULL, not blank. Attached are the screenshots.
As we know there's a limit on the number of dashboards with the option to run as the logged-in user, the below queries are useful while troubleshooting and resolving the error: SELECT FolderName,Title FROM Dashboard WHERE Type = 'LoggedInUser' OR Type = 'MyTeamUser' -> This will fetch the list if dynamic dashboards present in the org SELECT Id,Title FROM Dashboard WHERE Type != 'SpecifiedUser' -> This will return dynamic dashboards that are not in private folders. SELECT Id,Title FROM Dashboard USING SCOPE allPrivate WHERE Type != 'SpecifiedUser' -> This will return dynamic dashboards that are in private folders. Reference: https://help.salesforce.com/s/articleView?id=000385369&type=1
We can find the Nth highest value in screen flow using Get Records with a bit of logic. For example, we want to find the Nth highest NumberOfEmployees value across all the accounts. The idea is to fetch the records and then run a check to iterate over the records as long as the temp variable value is less than N value. The temp variable is initialized to 1. In the assignment we would keep on removing the first record. At the end, we will pick the first record from the collection. Attached are the screenshots. Note: this is just a POC flow and the error handlings, best practices are not covered.
I searched for the importance of the Salesforce Management system. Thanks, admin, for sharing such wonderful content on this topic. Now I have got everything I need about it.
ReplyDelete