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
Mike Lee PCLMike Lee PCL 

Apex test fails due to process builder record creation step

Hello. 

I have a problem with a test class where the setting up of data to prepare for the test causes a Process Builder to fire (creates a new record in CustObjA) and causes the Trigger I want to test to fire as well (Trigger on CustObjA). 

The problem is when I perform an insert of a record of CustObjA a little lower in the test class the Trigger does not run a second time. 

Essentially the Process Builder created a record in CustObjA and I'm no longer able to test my Insert Trigger because I can't get it to fire again.

Unfortunatley the record created in the Process Builder isn't usuable for my tests so I need to create a second one tailored to my needs.

Anyone else encounter this sort of issue?

Thanks,

Mike