Using uiObjectInfoApi – get sObject metadata and RecordType Info
Using uiObjectInfoApi
api will allow us to retrieve the available metadata about a specific object. Like object label, fields, recordtypes etc… all that and without writing a single line of APEX.