Skip to content

Commit

Permalink
Update BDI_DataImportService.cls
Browse files Browse the repository at this point in the history
  • Loading branch information
enzigma-pratishtha-upadhyay committed Apr 10, 2024
1 parent 743fd08 commit 4585e8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions force-app/main/default/classes/BDI_DataImportService.cls
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ global with sharing class BDI_DataImportService {
public static final String ACH_PAYMENT_METHOD = 'ACH';
public static final String DI_WITH_RD_FIELDS_NO_RD2 = System.label.RD2_DisabledRD2Error;
public static final String DI_WITH_RD_FIELDS_NO_ADV_MAPPING = System.label.RD2_DisabledAdvancedMappingError;
public static boolean isForBatchProcess = true;

public BDI_MappingService mappingService;

Expand Down Expand Up @@ -90,6 +91,7 @@ global with sharing class BDI_DataImportService {
* @return String the soql String
*/
public static String strSoqlForDataImportProcess(List<Id> dataImportIds) {
isForBatchProcess = false;
List<String> whereClauses = new List<String>{
'Status__c != \'' + BDI_DataImport_API.bdiImported + '\'',
'Id =: dataImportIds'
Expand All @@ -111,6 +113,7 @@ global with sharing class BDI_DataImportService {
* @return String the soql String
*/
public static String strSoqlForBatchProcess(Id batchId) {
isForBatchProcess = true;
List<String> selectClause = new List<String>{
String.join(listStrDataImportFields, ','),
DATAIMPORT_BATCH_NUMBER_FIELD
Expand Down Expand Up @@ -974,6 +977,10 @@ global with sharing class BDI_DataImportService {
Map<String, Schema.SObjectField> mapS = Schema.SObjectType.DataImport__c.fields.getMap();
listStrDataImportFields = new List<String>();
listStrDataImportFields.addAll(mapS.keySet());
if (isForBatchProcess == false) {
listStrDataImportFields.add('NPSP_Data_Import_Batch__r.Name');
listStrDataImportFields.add('NPSP_Data_Import_Batch__r.Batch_Number__c');
}
}
return listStrDataImportFields;
}
Expand Down

0 comments on commit 4585e8d

Please sign in to comment.