function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
William Roach 9William Roach 9 

Cannot get Code Coverage on afterDelete trigger

Hello forum, I am having trouble atchieving 75% code coverage on a trigger im writting and wondered if someone here knows what I am doing incorrectly. I am deleting code and asserting after the fact. Below you can find my trigger as well as the test class and main class. I use a custom testDataFactory to produce my data. 

TRIGGER:
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* Rate Review Attachment Counter Trigger Class 
*
* This class is designed to trigger RateReviewAttachmentCounter when the attachment in question is
* related to a Rate_Review__c object
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author         William L. Roach-Barrette   <REDACTED>
* @modifiedBy     
* @maintainedBy   
* @version        1.0
* @created        2019-04-16
* @modified       YYYY-MM-DD
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X            EMAIL
* YYYY-MM-DD      Explanation of the change.  Multiple lines can be used to explain the change, but
*                 each line should be indented till left aligned with the previous description text.
*
* vX.X            EMAIL
* YYYY-MM-DD      Each change to this file should be documented by incrementing the version number,
*                 and adding a new entry to this @changes list. Note that there is a single blank
*                 line between each @changes entry.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/
trigger RateReviewAttachmentTrigger on Attachment (after insert, after update, after delete) {
    if(Trigger.isInsert || Trigger.isUpdate){
        List<Attachment> approved = new List<Attachment>();
    	for(Attachment aiq: Trigger.new){
        	Id parentId = aiq.ParentId;
        	if(parentId.getSObjectType().getDescribe().getName() == 'Rate_Review__c'){
            	approved.add(aiq);
        	}
    	}
        RateReviewAttachmentCounter instance = new RateReviewAttachmentCounter();
        instance.attachmentCounter(approved);
	}
    //when handling a delete you want to pull data from trigger.old and not trigger.new
    if(Trigger.isAfter && Trigger.isdelete){
         List<Attachment> oldboys = new List<Attachment>();
    	for(Attachment aiq: Trigger.old){
        	Id parentId = aiq.ParentId;
        	if(parentId.getSObjectType().getDescribe().getName() == 'Rate_Review__c'){
            	oldboys.add(aiq);
        	}
    }
        RateReviewAttachmentCounter oldinstance = new RateReviewAttachmentCounter();
        oldinstance.attachmentCounter(oldboys);
}
}

MAIN CLASS: 
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* Rate Review Attachment Counter Main Class 
*
* This class is designed to monitor the number of attachments produced and attached to the RateReview
* object. This is to be used so that a salesperson cant create a new ratereview record without asscoiating
* at least one attached review with it. 
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author         William L. Roach-Barrette   <REDACTED>
* @modifiedBy     
* @maintainedBy   
* @version        1.0
* @created        2019-04-16
* @modified       YYYY-MM-DD
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X            EMAIL
* YYYY-MM-DD      Explanation of the change.  Multiple lines can be used to explain the change, but
*                 each line should be indented till left aligned with the previous description text.
*
* vX.X            EMAIL
* YYYY-MM-DD      Each change to this file should be documented by incrementing the version number,
*                 and adding a new entry to this @changes list. Note that there is a single blank
*                 line between each @changes entry.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/
public class RateReviewAttachmentCounter{
    
    public void attachmentCounter(List<Attachment> attachList){
        List<Rate_Review__c> rrList = new List<Rate_Review__c>();
    	List<Id> rrIdList = new List<Id>();
        List<Attachment> relatedAttachment = new List<Attachment>();
        for(Attachment attachy: attachList){
            rrIdList.add(attachy.ParentId);
            
        }
        rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        relatedAttachment = [SELECT id, parentId FROM Attachment WHERE parentId IN: rrIdList];
        
        for(Rate_Review__c rr: rrList){
            Integer attachmentCounter = 0;
            id RateReviewId = rr.id;
            for(Attachment atch: relatedAttachment){
                if(atch.parentId == RateReviewId){
                    attachmentCounter++;
                }
                
            }
            rr.Number_of_Attachments__c = attachmentCounter;
            
        }
        update rrList;
    }

}

TEST CLASS:
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* Rate Review Attachment Counter Test Class 
*
* This class is designed to test RateReviewAttachmentCounter when the attachment in question is
* related to a Rate_Review__c object
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author         William L. Roach-Barrette   <william.roach@pushpay.com>
* @modifiedBy     
* @maintainedBy   
* @version        1.0
* @created        2019-04-16
* @modified       YYYY-MM-DD
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X            EMAIL
* YYYY-MM-DD      Explanation of the change.  Multiple lines can be used to explain the change, but
*                 each line should be indented till left aligned with the previous description text.
*
* vX.X            EMAIL
* YYYY-MM-DD      Each change to this file should be documented by incrementing the version number,
*                 and adding a new entry to this @changes list. Note that there is a single blank
*                 line between each @changes entry.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/
@isTest
public class RateReviewAttachmentCounterTest {

    //The test setup was omitted from this class because governing limits are not a concern when testing and its easier to get direct access to 
    //produced data then it is to produce the data and querry for it in later tests. 
	/*@TestSetup
    public static void setup(){
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords = 1;
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords));
        System.assert(rrList.size() == numRecords, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords + ' ACTUAL: ' + rrList.size());
       
        
    }
*/

    static testmethod void testAttachmentCounter(){
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords = 5;//NumRecords dictates the total number of records produced for testing purposes. Increment for bulk testing and decrement for easy to read logs
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords));
        System.assert(rrList.size() == numRecords, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords + ' ACTUAL: ' + rrList.size());
        System.debug('RATE REVIEW OBJECTS: ' + rrList);
        List<Attachment> attachmentList = new List<Attachment>(dataGenerator.generateAttachments(rrList, numRecords));
        System.debug('ATTACHMENT LIST: ' + attachmentList);
        List<Id> rrIdList = new List<Id>();
        for(Rate_Review__c rateReview: rrList){
            rrIdList.add(rateReview.id);
        }
        Test.startTest();
        RateReviewAttachmentCounter methodtest = new RateReviewAttachmentCounter();
        methodtest.attachmentCounter(attachmentList);
        Test.stopTest();
        
        rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        System.assert(rrList.size() == numRecords, 'NOT ENOUGH RATE REVIEWS. EXPECTED: ' + numRecords + ' ACTUAL: ' + rrList.size() );
        for(Rate_Review__c rrfinal: rrList){
            System.assert(rrfinal.Number_of_Attachments__c == numRecords, 'NUM OF ATTACHMENTS NOT SET');
            System.debug('NUMBER OF ATTACHMENTS FIELD: ' + rrfinal.Number_of_Attachments__c);
        
        }
    }
        static testmethod void testAttachmentCounterDelete(){
        Test.startTest();
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords1 = 5;//NumRecords dictates the total number of records produced for testing purposes. Increment for bulk testing and decrement for easy to read logs
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords1));
        System.assert(rrList.size() == numRecords1, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords1 + ' ACTUAL: ' + rrList.size());
        System.debug('RATE REVIEW OBJECTS: ' + rrList);
        List<Attachment> attachmentList = new List<Attachment>(dataGenerator.generateAttachments(rrList, numRecords1));
        System.debug('ATTACHMENT LIST: ' + attachmentList);
        List<Id> rrIdList = new List<Id>();
        for(Rate_Review__c rateReview: rrList){
            rrIdList.add(rateReview.id);
        }
        
        RateReviewAttachmentCounter methodtest = new RateReviewAttachmentCounter();
        methodtest.attachmentCounter(attachmentList);
        
            delete attachmentList;
       
         Test.stopTest();
        rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        System.assert(rrList.size() == numRecords1, 'NOT ENOUGH RATE REVIEWS. EXPECTED: ' + 0 + ' ACTUAL: ' + rrList.size() );
        for(Rate_Review__c rrfinal: rrList){
            System.assert(rrfinal.Number_of_Attachments__c == 0 , 'NUM OF ATTACHMENTS NOT SET EXPECTED: ' + rrfinal.Number_of_Attachments__c + ' ACTUAL: ' + numRecords1);
            System.debug('NUMBER OF ATTACHMENTS FIELD: ' + rrfinal.Number_of_Attachments__c);
        
        }

       
        
    }
}

I currently have 56% code coverage on my trigger and 100% coverage on my main class. 
User-added image
Raj VakatiRaj Vakati
Try this 
 
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* Rate Review Attachment Counter Test Class 
*
* This class is designed to test RateReviewAttachmentCounter when the attachment in question is
* related to a Rate_Review__c object
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author         William L. Roach-Barrette   <william.roach@pushpay.com>
* @modifiedBy     
* @maintainedBy   
* @version        1.0
* @created        2019-04-16
* @modified       YYYY-MM-DD
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X            EMAIL
* YYYY-MM-DD      Explanation of the change.  Multiple lines can be used to explain the change, but
*                 each line should be indented till left aligned with the previous description text.
*
* vX.X            EMAIL
* YYYY-MM-DD      Each change to this file should be documented by incrementing the version number,
*                 and adding a new entry to this @changes list. Note that there is a single blank
*                 line between each @changes entry.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/
@isTest
public class RateReviewAttachmentCounterTest {

    //The test setup was omitted from this class because governing limits are not a concern when testing and its easier to get direct access to 
    //produced data then it is to produce the data and querry for it in later tests. 
	/*@TestSetup
    public static void setup(){
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords = 1;
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords));
        System.assert(rrList.size() == numRecords, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords + ' ACTUAL: ' + rrList.size());
       
        
    }
*/

    static testmethod void testAttachmentCounter(){
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords = 5;//NumRecords dictates the total number of records produced for testing purposes. Increment for bulk testing and decrement for easy to read logs
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords));
        System.assert(rrList.size() == numRecords, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords + ' ACTUAL: ' + rrList.size());
        System.debug('RATE REVIEW OBJECTS: ' + rrList);
        List<Attachment> attachmentList = new List<Attachment>(dataGenerator.generateAttachments(rrList, numRecords));
        System.debug('ATTACHMENT LIST: ' + attachmentList);
        List<Id> rrIdList = new List<Id>();
        for(Rate_Review__c rateReview: rrList){
            rrIdList.add(rateReview.id);
        }
        Test.startTest();
     
		delete attachmentList ; 
		
        Test.stopTest();
        
        rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        System.assert(rrList.size() == numRecords, 'NOT ENOUGH RATE REVIEWS. EXPECTED: ' + numRecords + ' ACTUAL: ' + rrList.size() );
        for(Rate_Review__c rrfinal: rrList){
            System.assert(rrfinal.Number_of_Attachments__c == numRecords, 'NUM OF ATTACHMENTS NOT SET');
            System.debug('NUMBER OF ATTACHMENTS FIELD: ' + rrfinal.Number_of_Attachments__c);
        
        }
    }
        static testmethod void testAttachmentCounterDelete(){
        Test.startTest();
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords1 = 5;//NumRecords dictates the total number of records produced for testing purposes. Increment for bulk testing and decrement for easy to read logs
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords1));
        System.assert(rrList.size() == numRecords1, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords1 + ' ACTUAL: ' + rrList.size());
        System.debug('RATE REVIEW OBJECTS: ' + rrList);
        List<Attachment> attachmentList = new List<Attachment>(dataGenerator.generateAttachments(rrList, numRecords1));
        System.debug('ATTACHMENT LIST: ' + attachmentList);
        List<Id> rrIdList = new List<Id>();
        for(Rate_Review__c rateReview: rrList){
            rrIdList.add(rateReview.id);
        }
        
		 
		
        delete attachmentList;
       
         Test.stopTest();
        rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        System.assert(rrList.size() == numRecords1, 'NOT ENOUGH RATE REVIEWS. EXPECTED: ' + 0 + ' ACTUAL: ' + rrList.size() );
        for(Rate_Review__c rrfinal: rrList){
            System.assert(rrfinal.Number_of_Attachments__c == 0 , 'NUM OF ATTACHMENTS NOT SET EXPECTED: ' + rrfinal.Number_of_Attachments__c + ' ACTUAL: ' + numRecords1);
            System.debug('NUMBER OF ATTACHMENTS FIELD: ' + rrfinal.Number_of_Attachments__c);
        
        }

       
        
    }
}

 
kumud thakur 20kumud thakur 20
Can you please try with these change in the last method of your test class :

static testmethod void testAttachmentCounterDelete(){
        
        TestDataFactory dataGenerator = new TestDataFactory();
        Integer numRecords1 = 5;//NumRecords dictates the total number of records produced for testing purposes. Increment for bulk testing and decrement for easy to read logs
        List<Rate_Review__c> rrList = new List<Rate_Review__c>(dataGenerator.generateRateReview(numRecords1));
        System.assert(rrList.size() == numRecords1, 'INCORRECT NUMBER OF RECORDS PRODUCED. REQUIRED: ' + numRecords1 + ' ACTUAL: ' + rrList.size());
        System.debug('RATE REVIEW OBJECTS: ' + rrList);
        List<Attachment> attachmentList = new List<Attachment>(dataGenerator.generateAttachments(rrList, numRecords1));
        System.debug('ATTACHMENT LIST: ' + attachmentList);
        List<Id> rrIdList = new List<Id>();
        for(Rate_Review__c rateReview: rrList){
            rrIdList.add(rateReview.id);
        }
        Test.startTest();
       // RateReviewAttachmentCounter methodtest = new RateReviewAttachmentCounter();
        //methodtest.attachmentCounter(attachmentList);  // I don't think so we require to call this method explictly becz it is already call by trigger
        List<Attachment> listAttch=[Select id from Attachment where ParentID in :rrIdList]
            delete attachmentList;
       
         Test.stopTest();
        /*rrList = [SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN: rrIdList];
        System.assert(rrList.size() == numRecords1, 'NOT ENOUGH RATE REVIEWS. EXPECTED: ' + 0 + ' ACTUAL: ' + rrList.size() );
        for(Rate_Review__c rrfinal: rrList){
            System.assert(rrfinal.Number_of_Attachments__c == 0 , 'NUM OF ATTACHMENTS NOT SET EXPECTED: ' + rrfinal.Number_of_Attachments__c + ' ACTUAL: ' + numRecords1);
            System.debug('NUMBER OF ATTACHMENTS FIELD: ' + rrfinal.Number_of_Attachments__c);
        
        }*/

       
        
    }

Thanks
William Roach 9William Roach 9
I want to thank both of the above contributors for offering solutions. Both of your modified methods pass tests but unfortunatly it does not change my code coverage. I am still stuck at 56% coverage. Does anyone else have any seguestions? It's as if the trigger doesnt recgonize that I am deleting records even though it is clear by my later assertion statements I am. 
kumud thakur 20kumud thakur 20
Sorry I made a mistake in these two lines above-
List<Attachment> listAttch=[Select id from Attachment where ParentID in :rrIdList]
          //  delete attachmentList; // comment this line
system.debug('==========listAttch'+listAttch);  // check the debug., should be attachment with id
delete listAttch;
system.debug([Select id from Attachment where ParentID in :rrIdList]);  // should be null
May be this will work. Please try and check the debug values.
William Roach 9William Roach 9
Unfortunately that change did not result in any additional code coverage. Here is a copy of the log from the first relevant debug stagement all the way to the second debug statement that should be null (system.debug([Select id from Attachment where ParentID in :rrIdList]);)
16:09:14.665 (1988021550)|USER_DEBUG|[85]|DEBUG|==========listAttch(Attachment:{Id=00P0k000003PSvREAW}, Attachment:{Id=00P0k000003PSvSEAW}, Attachment:{Id=00P0k000003PSvTEAW}, Attachment:{Id=00P0k000003PSvUEAW}, Attachment:{Id=00P0k000003PSvVEAW}, Attachment:{Id=00P0k000003PSvWEAW}, Attachment:{Id=00P0k000003PSvXEAW}, Attachment:{Id=00P0k000003PSvYEAW}, Attachment:{Id=00P0k000003PSvZEAW}, Attachment:{Id=00P0k000003PSvaEAG}, ...)
16:09:14.665 (1988077562)|DML_BEGIN|[86]|Op:Delete|Type:Attachment|Rows:25
16:09:15.75 (2075365838)|CUMULATIVE_LIMIT_USAGE
16:09:15.75 (2075365838)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100
  Number of query rows: 30 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 3 out of 150
  Number of DML rows: 35 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

16:09:15.75 (2075365838)|TESTING_LIMITS
16:09:15.75 (2075365838)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 1 out of 100
  Number of query rows: 25 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 1 out of 150
  Number of DML rows: 25 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

16:09:15.75 (2075365838)|CUMULATIVE_LIMIT_USAGE_END

16:09:14.665 (2078946255)|CODE_UNIT_STARTED|[EXTERNAL]|01q0k000000Etgv|RateReviewAttachmentTrigger on Attachment trigger event AfterDelete|__sfdc_trigger/RateReviewAttachmentTrigger
16:09:14.665 (2081530944)|SOQL_EXECUTE_BEGIN|[37]|Aggregations:0|SELECT id, Number_of_Attachments__c FROM Rate_Review__c WHERE id IN :tmpVar1
16:09:14.665 (2083904169)|SOQL_EXECUTE_END|[37]|Rows:5
16:09:14.665 (2084277932)|SOQL_EXECUTE_BEGIN|[38]|Aggregations:0|SELECT id, parentId FROM Attachment WHERE parentId IN :tmpVar1
16:09:14.665 (2086624330)|SOQL_EXECUTE_END|[38]|Rows:0
16:09:14.665 (2087042251)|DML_BEGIN|[52]|Op:Update|Type:Rate_Review__c|Rows:5
16:09:14.665 (2104704110)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Rate_Review:a8J0k0000004DV2
16:09:14.665 (2104730070)|VALIDATION_RULE|03d0k0000001245|Debit_Share_of_Card_Volume_less_than_100
16:09:14.665 (2104859201)|VALIDATION_FORMULA|Debit_Share_of_Card_Volume__c >1|Debit_Share_of_Card_Volume__c=null
16:09:14.665 (2104872166)|VALIDATION_PASS
16:09:14.665 (2104875759)|VALIDATION_RULE|03d0k00000011xT|Can_only_Select_One_Pricing_Plan
16:09:14.665 (2105052420)|VALIDATION_FORMULA|OR(
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_B__c = TRUE
),
AND(
 Select_Pricing_Plan_B__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
),
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
)
)|Select_Pricing_Plan_A__c=0 , Select_Pricing_Plan_B__c=0 , Select_Pricing_Plan_C__c=0
16:09:14.665 (2105064618)|VALIDATION_PASS
16:09:14.665 (2105073661)|CODE_UNIT_FINISHED|Validation:Rate_Review:a8J0k0000004DV2
16:09:14.665 (2106081872)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Rate_Review:a8J0k0000004DV3
16:09:14.665 (2106094962)|VALIDATION_RULE|03d0k0000001245|Debit_Share_of_Card_Volume_less_than_100
16:09:14.665 (2106171881)|VALIDATION_FORMULA|Debit_Share_of_Card_Volume__c >1|Debit_Share_of_Card_Volume__c=null
16:09:14.665 (2106180131)|VALIDATION_PASS
16:09:14.665 (2106182104)|VALIDATION_RULE|03d0k00000011xT|Can_only_Select_One_Pricing_Plan
16:09:14.665 (2106368521)|VALIDATION_FORMULA|OR(
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_B__c = TRUE
),
AND(
 Select_Pricing_Plan_B__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
),
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
)
)|Select_Pricing_Plan_A__c=0 , Select_Pricing_Plan_B__c=0 , Select_Pricing_Plan_C__c=0
16:09:14.665 (2106383100)|VALIDATION_PASS
16:09:14.665 (2106390950)|CODE_UNIT_FINISHED|Validation:Rate_Review:a8J0k0000004DV3
16:09:14.665 (2107420106)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Rate_Review:a8J0k0000004DV4
16:09:14.665 (2107440716)|VALIDATION_RULE|03d0k0000001245|Debit_Share_of_Card_Volume_less_than_100
16:09:14.665 (2107547788)|VALIDATION_FORMULA|Debit_Share_of_Card_Volume__c >1|Debit_Share_of_Card_Volume__c=null
16:09:14.665 (2107556266)|VALIDATION_PASS
16:09:14.665 (2107558348)|VALIDATION_RULE|03d0k00000011xT|Can_only_Select_One_Pricing_Plan
16:09:14.665 (2107684661)|VALIDATION_FORMULA|OR(
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_B__c = TRUE
),
AND(
 Select_Pricing_Plan_B__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
),
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
)
)|Select_Pricing_Plan_A__c=0 , Select_Pricing_Plan_B__c=0 , Select_Pricing_Plan_C__c=0
16:09:14.665 (2107694203)|VALIDATION_PASS
16:09:14.665 (2107700331)|CODE_UNIT_FINISHED|Validation:Rate_Review:a8J0k0000004DV4
16:09:14.665 (2108637502)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Rate_Review:a8J0k0000004DV5
16:09:14.665 (2108658112)|VALIDATION_RULE|03d0k0000001245|Debit_Share_of_Card_Volume_less_than_100
16:09:14.665 (2108764951)|VALIDATION_FORMULA|Debit_Share_of_Card_Volume__c >1|Debit_Share_of_Card_Volume__c=null
16:09:14.665 (2108777593)|VALIDATION_PASS
16:09:14.665 (2108780553)|VALIDATION_RULE|03d0k00000011xT|Can_only_Select_One_Pricing_Plan
16:09:14.665 (2108984978)|VALIDATION_FORMULA|OR(
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_B__c = TRUE
),
AND(
 Select_Pricing_Plan_B__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
),
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
)
)|Select_Pricing_Plan_A__c=0 , Select_Pricing_Plan_B__c=0 , Select_Pricing_Plan_C__c=0
16:09:14.665 (2109000374)|VALIDATION_PASS
16:09:14.665 (2109009552)|CODE_UNIT_FINISHED|Validation:Rate_Review:a8J0k0000004DV5
16:09:14.665 (2110012381)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Rate_Review:a8J0k0000004DV6
16:09:14.665 (2110027923)|VALIDATION_RULE|03d0k0000001245|Debit_Share_of_Card_Volume_less_than_100
16:09:14.665 (2110111215)|VALIDATION_FORMULA|Debit_Share_of_Card_Volume__c >1|Debit_Share_of_Card_Volume__c=null
16:09:14.665 (2110119133)|VALIDATION_PASS
16:09:14.665 (2110121235)|VALIDATION_RULE|03d0k00000011xT|Can_only_Select_One_Pricing_Plan
16:09:14.665 (2110281432)|VALIDATION_FORMULA|OR(
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_B__c = TRUE
),
AND(
 Select_Pricing_Plan_B__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
),
AND(
 Select_Pricing_Plan_A__c = TRUE,
 Select_Pricing_Plan_C__c = TRUE
)
)|Select_Pricing_Plan_A__c=0 , Select_Pricing_Plan_B__c=0 , Select_Pricing_Plan_C__c=0
16:09:14.665 (2110291451)|VALIDATION_PASS
16:09:14.665 (2110297829)|CODE_UNIT_FINISHED|Validation:Rate_Review:a8J0k0000004DV6
16:09:14.665 (2130137583)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01I0k000000ENTX
16:09:14.665 (2130197273)|CODE_UNIT_FINISHED|Workflow:01I0k000000ENTX
16:09:14.665 (2130661595)|DML_END|[52]
16:09:15.130 (2130768254)|CUMULATIVE_LIMIT_USAGE
16:09:15.130 (2130768254)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100
  Number of query rows: 30 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 3 out of 150
  Number of DML rows: 35 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

16:09:15.130 (2130768254)|TESTING_LIMITS
16:09:15.130 (2130768254)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 3 out of 100
  Number of query rows: 30 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 2 out of 150
  Number of DML rows: 30 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

16:09:15.130 (2130768254)|CUMULATIVE_LIMIT_USAGE_END

16:09:14.665 (2132073327)|CODE_UNIT_FINISHED|RateReviewAttachmentTrigger on Attachment trigger event AfterDelete|__sfdc_trigger/RateReviewAttachmentTrigger
16:09:14.665 (2135515710)|DML_END|[86]
16:09:14.665 (2136269045)|SOQL_EXECUTE_BEGIN|[87]|Aggregations:0|SELECT id FROM Attachment WHERE ParentID IN :tmpVar1
16:09:14.665 (2140214868)|SOQL_EXECUTE_END|[87]|Rows:0
16:09:14.665 (2140395389)|USER_DEBUG|[87]|DEBUG|Should be null ()
16:09:15.140 (2140424202)|CUMULATIVE_LIMIT_USAGE
16:09:15.140 (2140424202)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 2 out of 100
  Number of query rows: 30 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 3 out of 150
  Number of DML rows: 35 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10