You need to sign in to do that
Don't have an account?

History related list on VF page
Hi,
our developer has created this apex class on custom object (Invoice Client) so we can track field history tracking . On this object when we change status__c field then history is captured. We want to track history for other fields too. What is the easiest way to inlcude other fields so we can track history on it?
Thanks.
Richa
our developer has created this apex class on custom object (Invoice Client) so we can track field history tracking . On this object when we change status__c field then history is captured. We want to track history for other fields too. What is the easiest way to inlcude other fields so we can track history on it?
public with sharing class invoice { private final string sFieldHistoryTrackObjName = 'Invoice_client'; private final string sFieldHistoryTrackFldName = 'Status__c'; public string sHistoryTrackObjectName { get { return sFieldHistoryTrackObjName; } } public List<string> HistoryTrackFieldName { get { return new string[]{sFieldHistoryTrackFldName}; } } }
Thanks.
Richa
You can use this updated code Hope this help
Please let me know, in case any issue
--
Thanks
Swayam
All Answers
You can use this updated code Hope this help
Please let me know, in case any issue
--
Thanks
Swayam
Hi Swamay - thanks this works.
but the issue is, I am trying to track history of a field that has lookup to user. So when i change user it shows me the history
but with 2 rows (one with user id and one with name) . I only want to see only name.
Getting two rows is some thing different, Can you share API code where you are accessing the field and object.
--
Thanks,
Swayam
I mean above class is calling from some another Apex code, where there must be query to get the history.
Also. Can you please resolve this one and open a question with that,
--
Thanks,
Swayam