Salesforce – Automate Your Currency Rates

In one of the projects, there was a requirement to allow Finance Users to update currency rates. But managing currencies in Salesforce require having both “Customize Application” and “View Setup and Configuration” permissions. That would give access to multiple setup features, not only related to currencies.

That brought me a question – what if there are more organizations with similar need. How to allow Finance User to update currency rates without having to ask System Admin to do that?

Salesforce – How can I get the code coverage of a class / org?

To get code coverage of a class or all classes you can use Tooling API on objects like:

  • ApexCodeCoverage – contains coverage per class per test class
  • ApexCodeCoverageAggregate – contains coverage per class for all test classes
  • ApexOrgWideCoverage – contains coverage overall for all classes in the org

The best way is run queries using Developer Console

Salesforce – How to retrieve list of Chatter Files related to a record?

Files associated with a record can be stored in 2 ways: as an attachment (in the Notes & Attachments related list) as well as Salesforce Content (using Chatter Files).

Recently I had a task to create Visualforce pages, which put on the Page Layout as inline Visualforce showed the files posted by Chatter Files associated with the record. Adding files was carried out by the Chatter. Assigning Topics to an entry in Chatter allowed to filter files by this as a category.