1

((I figured this out by myself))

Standard field history tracking/audit logs will not work for this customer, they need to be able to track this info long term.

Does anyone have information on how to create custom logging records? Similiar to field history tracking but they need to be able to store and access this data on the fly. Any help would be appreciated!

1.Need logs for ALL fields if they are changed from A to B, need a way to display that to just admins. 2. Need to re render the VF page depending on which changes they have selected. For Example, if there are 4 changes that have been made to a record, I would need some type of selectlist on the VF page that has a system.date stamp on it, and if they choose that specific one it should show the old values from before it was edited

  • 1
    What exactly is the limitation? Field history is fairly robust and can be queried/exported easily -- all out-of-the-box functionality. – James Nov 2 '15 at 16:42
  • They need to be able to store this without exporting if needed, and report on the changes. They also need to be able to view specific changes from A to B. Also, once the record is approved I want to have a trigger fire off that will update certain values. I have a VF page right now that, when there are different changes, I was thinking about having a SelectOption, and depending on which option they choose it will re render the page with those old specific values from the log. – Christian Nov 2 '15 at 16:44
  • 1
    There's also detail objects on the master record – Christian Nov 2 '15 at 16:48
  • 1
    I recommend at least trying the field history feature. It's fully reportable using standard salesforce reports and appears as a Related List for the master record. This solution seems to have everything you need. – James Nov 2 '15 at 16:53
  • 1
    Isn't it limited to just 20 custom fields though? – Christian Nov 2 '15 at 17:03
2

I just saw from winter 16 you can query audit Trails with more than 6 months(Not entirely sure at this point)

List<SetupAuditTrail> setupTrailhistory= 
[SELECT Id,
    Action,
    CreatedBy.Name,
    CreatedDate,
    Display,
    Section 
 FROM SetupAuditTrail 
 ];

This means you can roll your custom VF or UI to show this to user .Also note that you will have to make page @readonly to allow more fetch and it will be good idea to filter .

Completely creating this solution means lot of data consumption for the client and may avoid that and use SFDC query feature provided

| improve this answer | |
  • Unfortunately, setup audit trail is not available in this special org : ( – Christian Nov 2 '15 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.