Display field history for the Case object.

Korey, the Salesforce history display is a murky place and Skuid is only going to be partially successful in reproducing the standard display.

The Action column in the standard display is not an actual field, but rather a concatenation of the Field, Changed From and Changed to values. There are also some speical situations like case creation where new and old values are not populated. A pretty accurate representation of this is possible in Skuid using a template field that does this concatenation and uses the conditional capabilities of the Skuid Template Syntax to modify the display in the special situations.

Use the syntax below to create a somewhat acceptable action display. Put this in a Template on the Case History Table.

{{#NewValue}}{{Field}} changed{{#OldValue}} from “{{OldValue}}”{{/OldValue}} to “{{NewValue}}”{{/NewValue}}{{^NewValue}}{{Field}}{{/NewValue}}

Look at “sections” in this help file for more information about conditional use of the Skuid Template Syntax

Just for some more reference here is what my table looks like in the buider:

Changed By is the Created By field, Date is the CreatedDate field with custom labels.

Here is what the product looks like rendered.

Now a few notes.

  1. Some fields do not populate the old or new value fields. I think Long Text fields are excluded. In this case just the field name that was changed is put in the Field value. However, that value also has “created, closed, esclalated” etc. And so it is hard to parse when to say “Changed description” and when to say “Case created” Some Javascript could be used with a series of case statements, but I’m trying a simple solution.

  2. Reference fields are problematic. Salesforce uses a special field type called “AnyType” and then populates rows in history for both the ID field and the Name field of the reference. Skuid cannot run conditions very effectively on the “AnyType” field and so we cannot exclude the rows that show the numeric ID’s. This is why you will see a two change rows above for record type - one being the name, and the second being the record type Id number. Again maybe some javascript could be used to exlcude those rows client side…

Maybe that gets you close enough?