public with sharing class LexSubmitExtensionController {
|
@AuraEnabled
|
public static InitData init(String recordId) {
|
InitData res = new InitData();
|
|
try {
|
List<Rental_Apply__c> racList = [SELECT Id, ExtensionStatus__c, Root_Rental_Apply__c, demo_purpose2__c, AgreementBorrowingExtensionDate__c, Return_dadeline_final__c from Rental_Apply__c where Id = :recordId];
|
if(racList.size()>0){
|
|
Rental_Apply__c rac = racList[0];
|
res.id = rac.Id;
|
res.extensionStatus = rac.ExtensionStatus__c;
|
res.rootRentalApply = rac.Root_Rental_Apply__c;
|
res.demoPurpose2 = rac.demo_purpose2__c;
|
res.agreementBorrowingExtensionDate = rac.AgreementBorrowingExtensionDate__c;
|
res.returnDadelineFinal = rac.Return_dadeline_final__c;
|
}
|
|
}
|
catch (Exception e) {
|
System.debug(LoggingLevel.INFO, '****e:' + e);
|
}
|
return res;
|
}
|
|
public class InitData {
|
@AuraEnabled
|
public String id;
|
@AuraEnabled
|
public String extensionStatus;
|
@AuraEnabled
|
public String rootRentalApply;
|
@AuraEnabled
|
public String demoPurpose2;
|
@AuraEnabled
|
public Date agreementBorrowingExtensionDate;
|
@AuraEnabled
|
public Date returnDadelineFinal;
|
}
|
}
|