Is there a way to see created by , last modified by in feild definition using tooling api, metadata api or other ways in Apex?
-
1What is your higher-level goal that you're trying to accomplish? Please edit your question.– identigralSep 2, 2022 at 19:00
-
1The goal is to provide a consolidated view by custom page for admins , so that they can see a list of the fields ,who created them, and who modified them and when. this opens up great opportunity for admins to better manage their orgs. e.g. one can run a report and show how many fields are created or modified in the past month, and who did that. ..– DonSep 2, 2022 at 19:31
-
4salesforce.stackexchange.com/questions/319559/… - this will work for any custom object. (The example uses custom metadata type)– identigralSep 2, 2022 at 20:12
-
Thanks, I had also checked this link– DonSep 5, 2022 at 9:33
2 Answers
it is possible and the fields are available via tooling api in the link below: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_system_fields.htm These fields are system fields and their information is not in the documentation of the FieldDefinition table, which was why I raised this question.
SELECT Label,LastModifiedById,LastModifiedDate FROM FieldDefinition WHERE PublisherId != 'System' AND EntityDefinitionId = 'Opportunity'