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.
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!
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.
- For standard objects, the
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
last_month
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