public with sharing class lexSolutionProgrammaController { @AuraEnabled public static InitData initForNewSolutionProgramma(String recordId){ InitData res = new InitData(); try { SolutionProjectRequirements__c so = [ select Status__c, GirWindowDirectorApproved__c, HospitalOwner__c from SolutionProjectRequirements__c where Id =: recordId ]; res.girWindowDirectorApproved = so.GirWindowDirectorApproved__c; res.hospitalOwnerId = so.HospitalOwner__c; res.status = so.Status__c; res.profileId = UserInfo.getProfileId(); res.m2profileId = [select Id from Profile where Name =: lexLightingButtonConstant.M2_PROFILE_NAME].Id; } catch (Exception e) { System.debug(e.getMessage()); } return res; } @AuraEnabled public static InitData initForNewSolutionClosingAttachment(String recordId){ InitData res = new InitData(); try { Solution_Programme__c so = [ select Scheme_Type__c from Solution_Programme__c where Id =: recordId ]; res.schemeType = so.Scheme_Type__c; } catch (Exception e) { System.debug(e.getMessage()); } return res; } public class InitData{ @AuraEnabled public String status; @AuraEnabled public Boolean girWindowDirectorApproved; @AuraEnabled public String hospitalOwnerId; @AuraEnabled public String profileId; @AuraEnabled public String m2profileId; @AuraEnabled public String schemeType; } }