twysparks
2023-05-06 0994d62436004bd83059c51a48b7cd430feb9f43
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
public with sharing class lexCustomDeleteController {
    @AuraEnabled
    public static InitData initForCustomDelete(String recordId){
        InitData res=new initData();
        try {
            Repair__c repair=[Select Id,Status__c,FSE_ApplyForRepair_time__c,SAP_Transfer_time__c,CreatedById,Repair_Ordered_Date__c,Acc_OwnerId__c,FSE_ownerid__c FROM Repair__c WHERE Id=:recordId limit 1];
            res.Id=repair.Id;
            res.Status=repair.Status__c;
            res.FSEApplyForRepairtime=repair.FSE_ApplyForRepair_time__c;
            res.SAP=repair.SAP_Transfer_time__c;
            res.cre=repair.CreatedById;
            res.Rep=repair.Repair_Ordered_Date__c;
            res.acc=repair.Acc_OwnerId__c;
            res.FSEownerId=repair.FSE_ownerid__c;
           // User user=[Select Id FROM User WHERE Repair__r.CreatedById=:res.cre limit 1];
            // res.UserId=repair.User__r.Id;
            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 Status;
        @AuraEnabled
        public Datetime SAP;
        @AuraEnabled
        public Datetime FSEApplyForRepairtime;
        @AuraEnabled
        public String cre;
        @AuraEnabled
        public Date Rep;
        @AuraEnabled
        public String acc;
         @AuraEnabled
         public String FSEownerId;
        @AuraEnabled
        public String UserId;
        @AuraEnabled
        public String ApiSessionId;
        
    }
}