• Prajvi
  • 0 Points
  • Member since 2020
  • Developer

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
Hey Guys!

Although I have >95% code coverage, however, I'd still like to get it to 100% and need some guidance with the following :)

How would you enter the Exception block below via Test Class? Passing an empty string to method1 probably won't work. Any other ideas that would force this to happen?
public class SomeClass {
    public static void method1(List<String> strings) {
        List<SObject> sObjects = [Select Id, Name FROM SObject WHERE Id IN :strings];
        if (sObjects.size() > 0) {
            for (SObject sObj : sObjects) {
                try {
                } catch (Exception ex) {

    public static void method2(SObject sObj) {
        //Do something here
Any help would be appreciated. Thanks!
  • February 03, 2020
  • Like
  • 0


I set up a process in process builder to execute fire tasks on a schedule. The process criteria is when a case is created or edited and the individual criteria node is when the status equals "Ready for Call" and does not equal "Closed - Completed". The actions are only executed when the specified actions are made to the record. The schedule is based 0 hours after a formula date field that calculates the next business day.

The scheduled actions work, but when I change the status to "Closed - Completed" the actions are still firing, even though the criteria is not met. This seems to be in contradiction to this documentation from salesforce:

For processes that are set to run when a record is created or edited, scheduled actions remain in the queue only as long as the criteria for those actions are still valid. If a record no longer matches the criteria, Salesforce removes the scheduled actions for that record from the queue.


Am I missing something here? Thanks in advance for the help.