Sample Code:
//Get all record types on Account object List<Schema.RecordTypeInfo> recordTypeInfoList = Account.SObjectType.getDescribe().getRecordTypeInfos(); String defaultRecordTypeId = ''; for(RecordTypeInfo info: recordTypeInfoList) { //Check default record type if(info.isDefaultRecordTypeMapping()){ defaultRecordTypeId = info.getRecordTypeId(); break; } } System.debug('DefaultRecordTypeId-' + defaultRecordTypeId);