public with sharing class toBatchOwnerController { @AuraEnabled public static string ProfileId(){ Profile p = [select Id,Name from Profile where id =:System.Label.ProfileId_SystemAdmin]; return p.Name; } @AuraEnabled public static InitData TypeId(){ InitData res = new initData(); try { res.recordTypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId(); res.endId = System.label.toBatch_endId; //niwu -01I100000016llf } catch (Exception e) { } return res; } public class InitData{ @AuraEnabled public String recordTypeId; @AuraEnabled public String endId; } }