Sign up ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I am using metadata API to retrieve the LastModifiedBy of an Object. But, it returns me only one User.

I wanted to know if we can track, the Users whoever modified the Object. Is it possible by any means?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Starting with Winter'16 the SetupAuditTrail object has now been exposed via the Salesforce API's and within Apex via SOQL. Its pretty much a mirror of the CSV download, accept for the Delegate User (though since this is documented, this could be a bug or something i'm missing). The following is a sample query from my latest blog where i dig into it a little further...

List<SetupAuditTrail> stuffDoneByConsultants = 
    [SELECT Id,
     FROM SetupAuditTrail 
     WHERE CreatedBy.Email LIKE ''];
share|improve this answer
Thanks @Andrew :) that looks like great information... – San Tosh Oct 19 at 11:06
Andrew - this is a great feature fr reporting! – Chirag Mehta Oct 28 at 6:27

I think you're looking for the Setup Audit Trail. This setup screen should display the last 20 metadata modifications, the last 6 months can be downloaded as csv.

Setup > Security Controls > View Setup Audit Trail

View Setup Audit Trail

Update: Apparently this data is not exposed/supported by the Metadata API (or any other). There is an idea on the IdeaExchange on which you can vote: Make Audit Setup Trail History available via the API

share|improve this answer
i want the same via metadata API. Is it possible through any other means, other than metadata? I need it in external application. – San Tosh Mar 4 '14 at 14:05
Sorry, did not pay attention to your tags, it may help if you explicitly mention that in your question. I interpreted "any means", as truly "any means". – Samuel De Rycke Mar 4 '14 at 14:07 problem :) – San Tosh Mar 4 '14 at 14:08
I don't know the metadata/docs well enough to be certain what you want isn't possible so i'll leave that up to someone else. – Samuel De Rycke Mar 4 '14 at 14:14
Nope, still no API access for the setup audit trail AFAIK. See this Idea: – jkraybill Mar 4 '14 at 14:23

Yes we can track all changes to salesforce through Audit Trial. There are some tools available in appexchange like AutoRABIT where we can track changes to all metadata memebers with given date and time. By using advanced search options we can search by date,metadata type,modified user,component name etc.

enter image description here



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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