liangxiaozhen
2023-08-06 1d17c4022a928eacff7309016cde76f29ad257fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public with sharing class toBatchOwnerController {
    @AuraEnabled
    public static string ProfileId(){
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        try {
 
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return p.Id;
    }
    @AuraEnabled
    public static InitData TypeId(){
        InitData res  = new initData();
        try {
            res.RecordTypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId();
            
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String RecordTypeId;
    }
}