Retrieve CustomField Metadata Information Using Tooling API

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)

2

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.
  • Etc…

References:

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_customfield.htm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s