Check out Salesforce Audit Trail Parser

May 272015

Salesforce – What is the difference between a task and an event?

Tasks are things to do, a "point in time" (no duration), such a prepare meeting notes, set up conference room. They can be set in a future and they have dates and statuses. You can have assigned to yourself or that someone else has assigned to you.

Events are meetings (i.e. sales meeting on the 10th from 2pm to 3pm with Fred & Wilma), so they have a start time, an end time, a location, and invitees (tasks can't).

Tagged with , , , 0 comments
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
Mar 262015

Salesforce – Audit Trail Parser

When I was preparing my first change set, I was a bit surprised that I couldn't get information about what was changed recently. Then I learned that there is Audit Trail which stores this kind of information as a changelog.

So I prepared a tool where you can upload a CSV file (from View Audit Trail section) and it will show you the changes made in the system (changed Apex classes, VF pages, objects, fields, profiles etc.).

Read more ...

Tagged with , , , , , 0 comments
Mar 192015

Salesforce – How to access Owner custom fields in a SOQL query?

Today I came across a problem with accessing Owner custom fields (for the User object I had several of these fields).

I only could access few standard fields like Owner.Name, Owner.FirstName without problems.

SELECT Id, Name, Owner.Name, Owner.FirstName, Owner.Store_Name__c
FROM CustomObject__c
WHERE Id = :ourId

ERROR at Row:1:Column:74
No such column 'Store_Name__c' on entity 'Name'.

Read more ...

Tagged with , , , 0 comments
Feb 242015

Salesforce – How to show different error messages in Apex / Visualforce?

When we build custom Visualforce page, there are times we want to send some error message to user saying that something went wrong or additional data is required. Other time we want just inform him, that process bas been successfully ended.

We can do this by showing different types Apex page message severities. To do this, just use one of the following: 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
1 2