buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
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
// with lwc lexNoReportApplication
    //author  kkbes
public  class LexNoReportApplicationController {
    @AuraEnabled
    public static OPDPlan__c initGetOpdData(String recordId){
        OPDPlan__c res = new OPDPlan__c();
        try {
            OPDPlan__c report = [select Id,Name,Status__c from OPDPlan__c where Id = :recordId];
            res=report;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
 
    @AuraEnabled
    public static String  getProfileIdByName(String Name){
        Profile profile = null;
        try {
            profile = [select Id from Profile where Name =:name];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return profile.Id;
 
    }
}