1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
    }
}