banner



How To Find A Field In Salesforce

This mail is a part of the daily blog series

A Tip A Day, daily dosage of learning!


24-hour interval #39 – Easily Detect Newly Created Fields

Finding the CreatedDate of fields in Lightning Experience is hard work.  The fields list in object manager doesn't have a column for 'Created Date'.  You need to manually click each and every field to know what's the created appointment.

Screenshot 2021-01-28 at 9.54.25 PM

Good luck if you want to observe what new fields were created this calendar week or this calendar month or even this quarter.

If you don't want to get through that manual clicking process, then you are at right place.  Here's a quick and easier way to find the list of newly created fields.

Open your Programmer Console, click on the Query Editor tab, click the "Use Tooling API" checkbox, so re-create the beneath query!

tooling api developer console custom fields created date sfdcfanboy

Here'southward the basic query to beginning with.  Fields created TODAY:

            SELECT DeveloperName, TableEnumOrId FROM CustomField  WHERE CreatedDate = TODAY                      

And the event evidence the custom fields:

  • DeveloperName is the field proper name.
  • TableEnumOrId is the ObjectName/ ObjectId.
    • For standard objects, the TableEnumOrId gives the Name of the object straight like Account, Contact, Opportunity etc.
    • For custom objects, it gives the Object ID.

Screenshot 2021-01-25 at 6.55.41 PM

If y'all want to fetch from a single object, yous tin likewise filter by TableEnumOrId:

Standard Object

            SELECT DeveloperName, TableEnumOrId FROM CustomField  WHERE CreatedDate = TODAY AND TableEnumOrId = 'Account'                      

Custom Object

            SELECT DeveloperName, TableEnumOrId FROM CustomField  WHERE CreatedDate = TODAY AND TableEnumOrId = '01I...'                      

WHere 01I… is the Id of the custom object, which you can become from the post-obit query or if you open up the Object in Object Manager in Salesforce, y'all'll run into the ID in the URL:

            SELECT Id, DeveloperName FROM CustomObject  WHERE DeveloperName = 'CustomObj'                      

Note that DeveloperName in the Tooling API never uses __c.

Yous may also use different filters in the WHERE condition like last_week, last_month, last_quarter, last_year etc.

last_week

Screenshot 2021-01-25 at 6.55.41 PM

last_month

Screenshot 2021-01-25 at 6.56.03 PM


Read all other tips of the web log series hither – A Tip A Day, daily dosage of learning!


Source: https://sfdcfanboy.com/2021/01/25/easily-find-newly-created-fields-in-salesforce/

Posted by: rettigthedidismind.blogspot.com

0 Response to "How To Find A Field In Salesforce"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel