Replies: 2 comments
-
Hi update [select Id from c2g__codaTransactionLineItem__c LIMIT 1]; Then try and deploy the trigger. |
Beta Was this translation helpful? Give feedback.
-
@clazarra we don't usually provide support through GitHub, just not enough people monitor it to give the best responses. I'd recommend posting in the Trailblazer Community Group linked in the Readme on the home page of the project. Many more people watch that and might be able to provide some better instructions. That said, before I close the discussion I'll provide what info I can. The error you're seeing boils down to "the record you inserted doesn't have enough data points and when you tried to save it something else in your system assumed one of those data points to be present and crashed" I don't know that package well but if you have anyone else in your organization that can help tune the test code to successfully insert a single The recommendation from @eggletm is one I see often. It says give this test code the ability to see the data currently in the system's database and try and perform an update using a presumably already compliant record. This avoid the need for our test code to know the correct values. This will often work but might have the following problems, if the system executing the test doesn't have any data (like an empty Sandbox) then the test will likely fail, if something about that specific record rejects updates (like the mentioned "lock" for those records) then it will likely fail. If you have code scanning in your environment then it will likely complain about using the See All Data flag on test code. Custom Test Code can be provided on the rollup configuration, at the bottom are some text boxes and the mentioned check box. If you add the contents of a custom test method there then try and deploy the triggers using Manage Child Triggers it should enable you to pass the deployment. Assuming the custom test code is compatible with your environment. |
Beta Was this translation helpful? Give feedback.
-
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, c2g.CODATransactionLineItem: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object (c2g): []
Stack Trace: (dlrs) Class.dlrs_c2godaTransactionLineItemTest.testTrigger: line 11, column 1
I'm deploying my roll up summary class/trigger dlrs_c2godaTransactionLineItemTest and dlrs_c2godaTransactionLineItemTrigger but it's getting failed due to Null Pointer Exception error. Is there a way to fix this?
Beta Was this translation helpful? Give feedback.
All reactions