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
troungertrounger 

Regarding filed history tracking

Hi every one i am new to salesforce 

currently i am trying tracking the a field named contact in custom object student

then in the student history i am getting 3 fields named as date, user, action 

'date' is showing that last modified date and time of the contact field 

and 'user' shows that who is owner

and 'action' showing that created , changed  and deleted like that

but student history table does not consist of any of these values 

 

 

now the problem is i want use 'date' field value that is last change of the perticular field (contact) then i want to update that value in visual force page page block table

 

so any one please tell me how to get that values

 

Thanks in advance

 

SaraagSaraag

Are you trying to get the last modified date of Contact field?

 

 

troungertrounger

Yes saraag if u know how to get the value last modified date of contact please let me know

 

Thanks in advance

SaraagSaraag

I would try something like 

 

select Max(createdDate),parentId,field from Student__history group by Field,parentId having field='Contact'

 

but I would imagine something like this would take a lot of time to run. If it was me, I would just add a hidden field on the object, use Work Flow rules and field update to set it to NOW() everytime contact field is changed and then simply query that field.

troungertrounger

That's right buddy first I think that may be that field can be used in some where in triggers so work up like that now I will try with work flow rules

 

by the way thanks very much