-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @description : | ||
* @author : [email protected] | ||
* @group : | ||
* @last modified on : 08-07-2024 | ||
* @last modified on : 12-17-2024 | ||
* @last modified by : [email protected] | ||
* Modifications Log | ||
* Ver Date Author Modification | ||
|
@@ -16,6 +16,12 @@ global with sharing class ListViewActionDelete extends ListViewAction { | |
|
||
} | ||
|
||
/* | ||
ListViewActionDelete d = new ListViewActionDelete(); | ||
List<String> recordIds = new List<String>(); | ||
recordIds.add('a003h00000C6MhXAAV'); | ||
d.process(recordIds, new Map<String, Object>()); | ||
*/ | ||
public override String process(List<String> recordIds, Map<String, Object> fieldValues) | ||
{ | ||
String returnStr = ListViewAction.RESULT_OK + ':'; | ||
|
@@ -47,6 +53,8 @@ global with sharing class ListViewActionDelete extends ListViewAction { | |
deletedObjs.put(recordId.substringBefore(':'), obj); | ||
} | ||
|
||
System.debug(LoggingLevel.DEBUG, 'About to delete records'); | ||
System.debug(LoggingLevel.DEBUG, 'deletedObjs - ' + deletedObjs); | ||
HelperDatabase.deleteRecords(deletedObjs.values()); | ||
|
||
if (deletedObjs.size() == 1) | ||
|
@@ -56,7 +64,7 @@ global with sharing class ListViewActionDelete extends ListViewAction { | |
|
||
} catch (Exception e) { | ||
String message = ListViewAction.RESULT_ERROR + ':There was an error deleting the ' + objType + '. Please see a system admin.'; | ||
if (ListViewConfigHelper.isDebuggingOn()) | ||
//if (ListViewConfigHelper.isDebuggingOn()) | ||
message += ' Exception during ListViewActionDelete.process() ' + ListViewException.getExtendedString(e); | ||
ListViewErrorHelper.createFutureUsageError(message); | ||
returnStr = message; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @description : | ||
* @author : [email protected] | ||
* @group : | ||
* @last modified on : 02-02-2022 | ||
* @last modified on : 12-17-2024 | ||
* @last modified by : [email protected] | ||
* Modifications Log | ||
* Ver Date Author Modification | ||
|
@@ -69,7 +69,7 @@ private class ListViewActionTest { | |
|
||
Test.startTest(); | ||
|
||
String result = ListViewController.processAction('Delete:ListViewActionDelete:Core:null', '["' + acct.Id + '"]', '[]'); | ||
String result = ListViewController.processAction('Delete:ListViewActionDelete:Core:null', '["' + acct.Id + '"]', ''); | ||
|
||
Test.stopTest(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @description : | ||
* @author : [email protected] | ||
* @group : | ||
* @last modified on : 09-16-2024 | ||
* @last modified on : 11-26-2024 | ||
* @last modified by : [email protected] | ||
* Modifications Log | ||
* Ver Date Author Modification | ||
|
@@ -64,6 +64,26 @@ private class ListViewConfigHelperTest { | |
System.assert(result == ''); | ||
//------------------------------------------------------------------------------------- | ||
|
||
//------------------------------------------------------------------------------------- | ||
//DOES NOT CONTAIN | ||
condition.Operator__c = ListViewConfigHelper.OPER_DOES_NOT_CONTAIN; | ||
condition.Value__c = 'Burlington'; | ||
value = 'Burlington Coat Factory'; | ||
type = ListViewHelper.TYPE_STRING; | ||
|
||
//NEGATIVE TEST | ||
result = ListViewConfigHelper.validateFieldCondition(value, type, condition); | ||
|
||
System.assert(result == ''); | ||
|
||
//NEGATIVE TEST | ||
value = 'Sterlington Coat Factory'; | ||
|
||
result = ListViewConfigHelper.validateFieldCondition(value, type, condition); | ||
|
||
System.assert(result == HIGHLIGHT_COLOR); | ||
//------------------------------------------------------------------------------------- | ||
|
||
//------------------------------------------------------------------------------------- | ||
//EQUALS | ||
condition.Operator__c = ListViewConfigHelper.OPER_EQUAL; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @description : | ||
* @author : [email protected] | ||
* @group : | ||
* @last modified on : 09-17-2024 | ||
* @last modified on : 12-17-2024 | ||
* @last modified by : [email protected] | ||
* Modifications Log | ||
* Ver Date Author Modification | ||
|
@@ -259,7 +259,7 @@ global class ListViewControllerTest { | |
System.assert(objs.size() > 0); | ||
|
||
|
||
List<ListViewController.SelectOption> listviews = ListViewController.getObjectListViews('Account'); | ||
List<ListViewController.SelectOption> listviews = ListViewController.getObjectListViews('Account', 0); | ||
|
||
System.assertNotEquals(listviews, null); | ||
System.assert(listviews.size() > 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters