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;
|
}
|
}
|