We're using the NPSP, and have created a custom trigger on the Oppportunity object, which is throwing an error during the Validate Deployment step, when moving the trigger to production. The trigger pulls data from the Custom Question object (related to the Transaction object), and writes the value to some custom fields in the Opportunity object.
The trigger and test coverage runs corrrectly and completely in a sandbox environnment (which was just updated from production). However, the code (test coverage) fails when trying to deploy to production.
Here is the pertinent error:
-----------------------------------
CnP_Custom_Question_Loader_TestSuite.verify_CnP_Cu stom_Question_Loader_Bulk System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CnP_PaaS.addCorresCont: execution of BeforeInsert
caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows).
----------------------------------
This seems to be an error in the addCorresCont trigger deployed in the C&P managed package. Since we cannot view the code, we do not know what is throwing this error. The error occurs on the line in our trigger that creates a new transaction object. We have more than 100,000 Contact records in production, and only 10 in the sandbox.
Additionally, after running all tests in production, the following failures occur with other C&P managed code:
CnP_Redirect_ControllerTest (testRedirectController method) fails with a System.DmlException (same failure we were getting in the above example of our trigger).
CnP_Transaction_Detail_ControllerTest (testRecurringDetailController method) fails with same System.DmlException.
Credit_TransactionsTest (testCreditTran method) fails with same System.DmlException.
SaveClass_Test (testSaveClass method) fails with same System.DmlException.
TestdataConvert (TestdataConvert method) fails with same System.DmlException.
We've searched through the online manual, but there are no references to the triggers that run in the managed code.
We need some help in determining why all of these methods in CnP's managed code are throwing DmlExceptions.
Thanks for any help in advance.
The trigger and test coverage runs corrrectly and completely in a sandbox environnment (which was just updated from production). However, the code (test coverage) fails when trying to deploy to production.
Here is the pertinent error:
-----------------------------------
CnP_Custom_Question_Loader_TestSuite.verify_CnP_Cu stom_Question_Loader_Bulk System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, CnP_PaaS.addCorresCont: execution of BeforeInsert
caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows).
----------------------------------
This seems to be an error in the addCorresCont trigger deployed in the C&P managed package. Since we cannot view the code, we do not know what is throwing this error. The error occurs on the line in our trigger that creates a new transaction object. We have more than 100,000 Contact records in production, and only 10 in the sandbox.
Additionally, after running all tests in production, the following failures occur with other C&P managed code:
CnP_Redirect_ControllerTest (testRedirectController method) fails with a System.DmlException (same failure we were getting in the above example of our trigger).
CnP_Transaction_Detail_ControllerTest (testRecurringDetailController method) fails with same System.DmlException.
Credit_TransactionsTest (testCreditTran method) fails with same System.DmlException.
SaveClass_Test (testSaveClass method) fails with same System.DmlException.
TestdataConvert (TestdataConvert method) fails with same System.DmlException.
We've searched through the online manual, but there are no references to the triggers that run in the managed code.
We need some help in determining why all of these methods in CnP's managed code are throwing DmlExceptions.
Thanks for any help in advance.
Comment