public with sharing class LexCICInputSolutionController { @AuraEnabled public static List initCICInputSolution(String recordId) { return [Select Id,inquiry_detail__c,answer_detail_content__c from Case Where Id = :recordId]; } @AuraEnabled public static InitCustomCloneData initCustomClone(String recordId) { InitCustomCloneData customCloneData = new InitCustomCloneData(); String caseRecordType = [select Id,DeveloperName from RecordType where SobjectType = 'Case' and DeveloperName = 'CICRecordType'].Id; customCloneData.caseRecordType = caseRecordType; customCloneData.caseList = [Select Id,inquiry_detail__c,answer_detail_content__c from Case Where Id = :recordId]; return customCloneData; } @AuraEnabled public static InitNewCICContactData initNewCICContact(String recordId) { InitNewCICContactData initNewCICContactData = new InitNewCICContactData(); String contactRecordType = [select Id,DeveloperName from RecordType where SobjectType = 'Contact' and DeveloperName = 'Agency'].Id; String caseRecordType = [select Id,DeveloperName from RecordType where SobjectType = 'Case' and DeveloperName = 'CICRecordType'].Id; initNewCICContactData.contactRecordType = contactRecordType; initNewCICContactData.caseRecordType = caseRecordType; List contactList = [select id, Account.Id,Account.Parent_Parent__c ,RecordTypeId from Contact where Id= :recordId]; initNewCICContactData.contactList = contactList; return initNewCICContactData; } public class InitNewCICContactData{ @AuraEnabled public String contactRecordType; @AuraEnabled public String caseRecordType; @AuraEnabled public List contactList; } public class InitCustomCloneData{ @AuraEnabled public String caseRecordType; @AuraEnabled public List caseList; } }