get fields of object schema apex code example Example: apex get object fields Map fieldMap = Schema.SObjectType..fields.getMap();