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
debradebra 

Test failures related to new Process Builder/Flows only with Cset Tests but Not Apex Test Runs

I am testing deployments in sandbox and ran into unexpected errors on Test execution only with Change Set Validation tests but the same tests succeed with Apex Tests.  The Cset I'm testing contains Apex Classes that are exactly the same as the destination Org (no changes) so the code matches the code already in the Org.
Also the errors reported (see example below) do not clearly point to which Flow or Process Builder instance is the issue.
The errors are all the same just in different test methods/line numbers.  The tests are mostly related to quote object while I have no PB/Flows related to quotes.  Only Opportunities and Opportunity products.  The Flows in question have been heavily tested by end-users and developers and seem to be working just fine both single row and bulk row updates.

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, The record couldn’t be saved because it failed to trigger a flow. unable to find field dataType for complex reference: myVariable_current.Product2.Id, element: interaction.definition.mdapi.FlowVariable@75bde1c9, dataType: null Contact your administrator for help.: []

Any suggestions?
 
Prathyusha JPrathyusha J
If it is related to Apex Unit Test: https://help.salesforce.com/apex/HTViewSolution?id=000233273&language=en_US
If it is related to Flow: Try to create a new version of existing flows and activate it.  It will resolve the issue.
https://success.salesforce.com/issues_view?id=a1p300000008Xn7AAE