Sometimes Salesforce admin/user needs to know which custom fields created in a certain time frame like THIS Week/Month/Year, etc.
We can use Salesforce Tooling API to get the Custom Field information. We can query the Custom Field metadata information inside Salesforce developer console, you just need to check the “Use Tooling API” checkbox. Below is the screenshot showing the lists of custom fields created this year.
Query: SELECT DeveloperName,CreatedDate,TableEnumOrId FROM CustomField where CreatedDate = THIS_YEAR
Q. How to export the data showing in dev console in CSV format?
Ans~ We can use the ‘SDFC Dev Console Data Exporter‘ google chrome extension for that.
SFDC Dev Console Data Exporter (Screenshot)
Q. What is the Tooling API?
Ans~ Tooling API exposes metadata information of Org, we can access Metadata information using REST or SOAP. Tooling API retrieve the small piece of metadata, we can use this to develop an interactive application or tools for developers.
We can accomplish the following tasks using the Tooling API:
- Retrieve metadata about an object’s field.
- Retrieve metadata of custom and standard object properties.
- Get metadata information about Apex Classes, Visualforce Pages, Apex Triggers.
- Get Code coverage details of Apex classes and Trigger.
- Retrieve metadata information about ValidationRule and WorkflowRules.
- Query RecentItems used in your SFDC org.