19626
2023-06-29 45e4876c811c861adc5744d06b5bba840fae397a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public with sharing class lexLastbuyProductController {
    @AuraEnabled
    public static InitData initForCBLBPNew(String recordId){
        InitData res = new InitData();
        try {
            Product2 pro = [
                select
                Name
                from Product2 where Id =: recordId  
            ];
            res.name = pro.Name;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    class InitData{
        @AuraEnabled
        public String name;
    }
}