function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ShakespeareShakespeare 

How to Find History Tracking or Audit Log

Hi Everybody,

 

I have a custom object. Through Create --> Object, I have checked the option of History Tracking for Object and some of the Fields. Then from the Layouts of the object I have add the History Tracking list to my custom object page also. Now that I have done that all as mentioned in the Help, I am surprised that where to find the tracking logs. Where the user should go to find tracked history to audit the changes on a particular record.

 

Thanks & Regards,
Shakespeare

lvivaninlvivanin

What about creating the Object History Report?

 

- lvivanin

ShakespeareShakespeare
Thanks for your feedback. I have tried it through reports tab. It shows me the report of changes and just displays the current records only for my custom object ... but unfortunately it does not show me the changes e.g., I have a field 'Advertiser' (displayed as a text field) on my custom object. I create a record and put in some value say 'XYZ' in 'Advertiser', then after sometime I again open the very same record and change Advertiser from 'XYZ' to 'XYZ-1'. Now I want my history to display that which user made what change. Can I see changes in that way? But the History page block that is created in layouts when I add History list from Related Lists in page layouts of my custom object, is not displayed when I open the page. How I can I get it displayed on the same page where I add the History Related List? Thanks,Shakespeare
lvivaninlvivanin

Edit Page Layout-->Custom object History Related Lists view -->Drag & Drop the custom object History on the page layout related history section  -->Save


To display the required field(s) on the custom object History Related Lists:

1. Select the name of the custom object.
2. Click Set History Tracking in the Custom Fields & Relationships section. This section allows you to set history tracking for both standard and custom fields on custom objects.

When you choose the fields you want to track, Salesforce begins tracking history from that date and time forward. Changes made before that date and time are not included in the history.

If you deselected the Track Field History checkbox, the Set History Tracking button does not display.
3. Choose the fields you want tracked in the History related list of the record detail page.
4. Click Save.

 

I think you can track the history this way.

 

--lvivanin

XeeshanXeeshan

I am facing exactly the same problem. I am unable to see the history on my visualforce page with custom controller and custom object. I have to open this page as a popup from Operations in Contract. Let me categorically mention what I have done and please point out if I have missed anything.

1- Created a custom object with some text fields.
2- Created a respective visualforce page with those fields displayed as multiline editor.
3- Created a respective custom controller with all events mentioned on it.

//Upto here everything works perfect. Now I came to history tracking.
4- To track the history I have done the following steps:
            i) Setup --> Create --> Objects --> located (searched) and clicked my custom object, custom object detail is displayed for in readonly    mode.
            ii) On my custom object in first page block 'Custom Object Definition Detail', clicked on edit button and checked the 'Track Field History' checkbox and saved.
            iii) I have got a button 'Set History Tracking' displayed on 'Custom Fields & Relationship' page block on custom object detail page.
            iv) I clicked on this button and checked some custom fields for history tracking and saved.
            v) Now I went to 'Page Layouts' page block on the same custom object detail page, and clicked on Edit link on the only displayed default page layout (made sure that this layout has linked to my profile of system admin).
            vi) From the page layout, clicked on the 'Related Lists' link and dragged and dropped on the page layout. Then saved.
            * I can see a page block 'xyzForm Hisotry' has been added in the page layout.

5- Now I come back to the Contract and click on the respective link. I am unable to see the History page block on the

popup window, despite of making changes.

This is exactly what I have done and by strictly following the online stuff. I believe this is what you are saying. But I am really stuck on this point as to why history is not being displayed on my new VisualForce page.

 

Thank for your help in anticipation.

 

Regards,
XEE

lvivaninlvivanin
Test custom controller:

 public class MyController {

      private final Master_Object__c customObject;

      public MyController() {
            customObject = [select Total_Money__c from Master_Object__c where id =
                       :ApexPages.currentPage().getParameters().get('id')];
      }

      public Master_Object__c getcustomObject() {
            return customObject;
      }

      public PageReference save() {
            update customObject;
            return null;
      }
}

 

Test VF page:

 

<apex:page controller="MyController" >
   <apex:form >
      <apex:pageBlock title="Congratulations {!$User.FirstName}">
         You belong to the customObject Name: <apex:inputField value="{!customObject.Total_Money__c}"/>
         <apex:commandButton action="{!save}" value="save"/>
      </apex:pageBlock>
      <apex:detail relatedList="true"/>
   </apex:form>
</apex:page>
XeeshanXeeshan

Hi Ivivanin,

 

First of all thanks for your suggestion. I have added <apex:detail/> with relatedList attribute as true but to of no use. I then exactly mimicked your code (made an object named 'customObject', a controller 'MyController' and all that you have given) and executed it. Unfortunatley I am still unable to see the history tracking on my custom page.

 

I really appriciate your help in this regard.

 

Thanks,
XEE

Kamran-RaoKamran-Rao

Folks,

 

I am also stuck on the similar issue.

 

Anywork around?

 

Rao

lvivaninlvivanin

By the way have u marked the test field(Total_Money__c ) as history tracking : Custom Fields & Relationships --> History Tracking?

 

 

lvivaninlvivanin

Following is the sample history tracking result of the VF page - in my case:

 

https://na6.visual.force.com/apex/masterObjectPage?id=a028000000AlBZ3

Master Object History
          
Date                             User    Action
6/16/2009 11:18 AM    XY Z    Changed Total Money from $1.00 to $100.00.
6/16/2009 7:07 AM      XY Z    Changed Total Money from $100.00 to $1.00.
2/12/2009 10:57 AM    XY Z    Created.

 

 

Kamran-RaoKamran-Rao

Hi Ivivavan,

 

I have strictly followed all the steps as mentioned by Mr. Xee in his detailed post in his 'Message 5 of ...' above. I am unable to understand what have I missed?

 

- Checked history tracking on my custom object.
- Checked history tracking on individual fields.
- Dragged and Dropped customObject History on my page from custom page layouts.
- Verified the layout assignment to my user profile.

 

Thank you for your continual contribution on this thread.

 

Rao

lvivaninlvivanin

U have the "Customize Application" User Permission?

 

 

Kamran-RaoKamran-Rao

Ivivanin,

 

I have System Adminstrator profile and this profile also inclues 'Customize Application' permission. I am also thininkg of these lines and I have checked that layout is assigned to System Admins in my SystemAdmin profile we have this page (customObject) in 'Enabled Visualforce Page Access' and my contoller is in 'Enabled Apex Class Access'.

 

It seems to me similar user specific issue or configurations or settings type of issue.

 

I am sure you will immediately drop a message if something new comes to your mind, apologies for mispelling your name :).

 

Thanks,

Rao

Kamran-RaoKamran-Rao

I am just near the solution of the issue, then definately I will discuss it in detail. But before that I have a question;

 

Is there any way that I can 'rerender' the history related list on my some button click and also pass it some param?

 

Regards,

Rao

Nannie GouldNannie Gould
A record's audit log is the best method for tracking  like proovia tracking (https://protrackinghub.com/proovia-tracking/) changes that occur over the course of a record's history. To access the audit log, simply navigate to a record's record view and select "View Audit Log" from the Actions menu.
colleen camachocolleen camacho

To view the audit history, from Setup, in the Quick Find box, enter View Setup Audit Trail , then select View Setup Audit Trail. To download your org's complete setup history for the past 180 days, click Download.Let's Get Tracking.To view the setup Audit Trail history, click Setup –> Security Controls –> View Setup Audit Trail.In the account menu, select Account Analytics. Click the User Activity tab. Note If you don't see the User Activity tab, in Account settings, uncheck Hide Account Analytics User Level Data. View the total number of unique active users [1] based on the time period.Field history reports let you track changes in fields by adding an “Old Value” and a “New Value” column. With a field history report, each report row represents a change to a record. By filtering a field history report, you can answer questions like “Which opportunities have we closed so far this financial quarter?”If field history tracking is enabled for an object, the changes are stored in history table for that particular object. The API name of these tables follows a simple convention so should be easy to find.Salesforce field history tracking is a method that can be used to track changes associated with each specific field. It can be used for both standard objects as well as custom objects that are specific to your company. For a particular field, the process is straightforward.From the management settings for the object whose field history you want to track, go to the fields area. Click Set History Tracking. Tip When you enable seacorp tracking no (https://couriertrackingfinder.com/seacorp-tracking/) for an object, customize your page layouts to include the object's history related list.Feed tracking detects changes to tracked record fields and posts them as updates in the What I Follow feed. Users who follow a record, see those updates in their view of What I Follow, with one exception. Updates users make themselves aren't posted to What I Follow. Users can see those updates in their profile feeds.
Click the gear icon and Choose Setup.
Under Objects and Fields, choose the Object Manager.
Select Chargent Order or Transactions depending on which one you're doing first.
Select Fields & Relationships.
Click the Set History Tracking button.
Choose what fields you want to track.
Be sure to click save.For standard objects (e.g. Lead, Account, Contact, etc), click "Set History Tracking" when viewing Fields & Relationships for a given object in Object Manager. On the next screen select "Enable {ObjectName} History" and then select the field you want to track.
fgbv yhgbnfgbv yhgbn

JRS has become one of the most popular delivery and logistics companies due to offering ultra-modern services. They aim to facilitate all the customers and meet the digital-era requirements. If you don’t have time to visit the franchise and book your parcel, you don’t need to worry about it. The JRS Express (https://jrstracking.com/) representatives will pick up your package and deliver it to your desired address.