public with sharing class lexAgencyHospitalController { @AuraEnabled public static InitData queryForAgencyHospitalRecordType(String recordId){ InitData res = new InitData(); try { RecordType recordType = [ select Id from RecordType where DeveloperName = 'AHospital' and SobjectType = 'Agency_Hospital_Link__c' ]; } catch (Exception e) { throw new AuraHandledException(e.getMessage()); } } class InitData{ } }