Field History Tracking Workaround in Salesforce Lightning

Field History Tracking Workaround in Salesforce Lightning
field history tracking

The new UI for Salesforce, Lightning, offers a lot of new, updated functionality for the Salesforce platform. It’s no secret that there are a few remaining areas where Salesforce is working diligently to address functionality gaps. Our experience has been that the gains far outweigh the pains and that even the workarounds in Lightning are better than in Classic!

As a Salesforce Solutions Implementation Partner, Modacto has been delivering Lightning projects since its release and we’ve discovered a couple of small gaps that on the surface don’t seem that important, but for some customers, some of these functions are of high value. The case that we will highlight today is Field History Tracking. Field History Tracking has been available in Salesforce Classic for a long time, and the functionality also is present in Lightning. However, in Lightning, the data is present, but not displayed in a readable form.

For one of our customers, the ability to see Field History Tracking was imperative so we created a custom Component that displays it in Lightning. Our path to the final solution cycled through a couple of iterations. First, we used a Component that Salesforce Lab shared with the ecosystem to show a related list. We were initially excited because, in Classic, you see Field History Tracking as a related list. We quickly discovered that the Object housing the info is a little more involved – especially because you don’t know the type of field you are going to be tracking. Text fields are relatively easy, but you also have to account for percentage fields, currency fields, etc. We quickly learned that the Salesforce Labs Related List Component wouldn’t work for two reasons: 1) it was not handling different Field Types, and 2) it was making reference to different Records and only showing the Record ID instead of a human-readable value.

We then pivoted to building a Component that was smart enough to know in which Object Lightning Page that it lived, grab the Record ID of that Object, and carry the required info into the Field Tracking Object where the info was rendered correctly to allow the end user to see the Field Tracking History.

While we and our customer were aware that Salesforce would soon release functionality to address this gap, this low-calorie effort had enough value to the customer to offset the minimal cost of building the Component.  We believe that this is yet another testament to the incredible flexibility and cost-effectiveness of the Salesforce Platform now made even better by the extended capabilities of Lightning.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*