apex

May 222015

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

Read more …

Tagged with , , , , , , 0 comments
Feb 242015

Salesforce – How to get translated values of picklist and Record Types in Apex?

When we create an application that uses multiple languages, we use translation workbench is the purpose of the translation. Salesforce takes care of the translation user interface, so we always got the right language. But to get the data (picklist values and record type names) in the appropriate language in Apex and VisualForce – we have to do it ourself.

Read more …

Tagged with , , , , , , , , 0 comments