Skip to content

Commit

Permalink
ALR-1769
Browse files Browse the repository at this point in the history
  • Loading branch information
Keerthana9894 committed Jul 19, 2024
1 parent 6a8f4f8 commit 7bfafc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/default/classes/ChangeAccountOwner.cls
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public with sharing class ChangeAccountOwner {

public static Map<Id, List<BusinessLicenseApplication>> getRelatedBlaRecords(List<Id> accountId) {
Map<Id, List<BusinessLicenseApplication>> resultMap = new Map<Id, List<BusinessLicenseApplication>>();
for (BusinessLicenseApplication bla : [SELECT Id, OwnerId, AccountId FROM BusinessLicenseApplication WHERE AccountId IN :accountId AND RecordType.Name='New License' AND Status !='Closed']) {
for (BusinessLicenseApplication bla : [SELECT Id, OwnerId, AccountId FROM BusinessLicenseApplication WHERE AccountId IN :accountId AND RecordType.Name='New License' AND Status !='Closed' AND Status !='Pending Approval']) {
if (!resultMap.containsKey(bla.AccountId)) {
resultMap.put(bla.AccountId, new List<BusinessLicenseApplication>());
}
Expand All @@ -145,7 +145,7 @@ public with sharing class ChangeAccountOwner {

public static Map<Id, List<Case>> getRelatedCaseRecords(List<Id> accountId) {
Map<Id, List<Case>> resultMap = new Map<Id, List<Case>>();
for (Case caseRec : [SELECT Id, OwnerId, AccountId FROM Case WHERE AccountId IN :accountId AND Status != 'Closed']) {
for (Case caseRec : [SELECT Id, OwnerId, AccountId FROM Case WHERE AccountId IN :accountId AND Status != 'Closed' AND Status !='Pending Approval']) {
if (!resultMap.containsKey(caseRec.AccountId)) {
resultMap.put(caseRec.AccountId, new List<Case>());
}
Expand Down

0 comments on commit 7bfafc1

Please sign in to comment.