diff --git a/flow_action_components/ApprovalChecker/LockChecker.cls-meta.xml b/flow_action_components/ApprovalChecker/LockChecker.cls-meta.xml new file mode 100644 index 000000000..651b17293 --- /dev/null +++ b/flow_action_components/ApprovalChecker/LockChecker.cls-meta.xml @@ -0,0 +1,5 @@ + + + 61.0 + Active + diff --git a/flow_action_components/ApprovalChecker/LockCheckerTest.cls b/flow_action_components/ApprovalChecker/LockCheckerTest.cls new file mode 100644 index 000000000..5e0d351df --- /dev/null +++ b/flow_action_components/ApprovalChecker/LockCheckerTest.cls @@ -0,0 +1,16 @@ +@isTest +private class LockCheckerTest { + @isTest + static void testIsLocked() { + // Create test data + Account acc = new Account(Name='Test Account'); + insert acc; + + // Call the method to be tested + List result = LockChecker.isLocked(new List{acc.Id}); + + // Perform assertions + System.assertEquals(1, result.size(), 'Result should have only one entry'); + System.assertEquals(false, result[0], 'The test account should not be locked'); + } +} diff --git a/flow_action_components/ApprovalChecker/LockCheckerTest.cls-meta.xml b/flow_action_components/ApprovalChecker/LockCheckerTest.cls-meta.xml new file mode 100644 index 000000000..651b17293 --- /dev/null +++ b/flow_action_components/ApprovalChecker/LockCheckerTest.cls-meta.xml @@ -0,0 +1,5 @@ + + + 61.0 + Active + diff --git a/flow_action_components/LockChecker/LockChecker.cls b/flow_action_components/LockChecker/LockChecker.cls new file mode 100644 index 000000000..c7b5a64a3 --- /dev/null +++ b/flow_action_components/LockChecker/LockChecker.cls @@ -0,0 +1,9 @@ +public class LockChecker { + @InvocableMethod (label='Check if a record is locked') + public static List isLocked(List recordIdToCheck) { + List isLockedList = new List(); + for (Id recordId : recordIdToCheck) { + isLockedList.add(system.Approval.isLocked(recordId)); + } + return isLockedList;} +} diff --git a/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_actionList3/fsc_actionList3.js-meta.xml b/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_actionList3/fsc_actionList3.js-meta.xml index d000d7828..70fcb62e1 100644 --- a/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_actionList3/fsc_actionList3.js-meta.xml +++ b/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_actionList3/fsc_actionList3.js-meta.xml @@ -2,7 +2,7 @@ - 57.0 + 60.0 false diff --git a/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_flexcardCPE/fsc_flexcardCPE.html b/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_flexcardCPE/fsc_flexcardCPE.html index fea9c29ca..f172d8d59 100644 --- a/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_flexcardCPE/fsc_flexcardCPE.html +++ b/flow_screen_components/FlowScreenComponentsBasePack/force-app/main/default/lwc/fsc_flexcardCPE/fsc_flexcardCPE.html @@ -2,7 +2,7 @@ @description : @author : ChangeMeIn@UserSettingsUnder.SFDoc @group : - @last modified on : 08-20-2023 + @last modified on : 04-29-2024 @last modified by : Josh Dayment -->