public with sharing class NewAgencyContractController { @AuraEnabled public static UserResult UserInfo_Owner() { UserResult result = new UserResult(); ID myUserID = UserInfo.getUserId(); try { User tempUser = [select Id,ProfileId from user where id = : myUserID ]; result.id = tempUser.Id; result.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContract').getRecordTypeId(); result.profileId = tempUser.ProfileId; } catch (exception e) { result.result = e.getMessage(); } return result; } public class UserResult { @AuraEnabled public string result; public UserResult( ) { result = 'Success'; } @AuraEnabled public string id; @AuraEnabled public String recordTypeId; @AuraEnabled public string profileId; } }