tt
twysparks
2023-04-26 26ad084e248b21ced76e6226ab2a32db53f582b9
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
28
public with sharing class buttonRepairSubOrderCtl {
    public buttonRepairSubOrderCtl() {
 
    }
 
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            RepairSubOrder__c report =  [SELECT Id,Status__c FROM RepairSubOrder__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.StatusC = report.Status__c;
 
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }   
 
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String StatusC;
     }
}