DLRS Trigger test fails - IIM movement date
When I try to set up a DLRS from the Inbound Inventory Movement object, I get this error when I try to deploy the APEX trigger and class needed:
dlrs_AcctSeedERP_Inbound_Inventora3uTest.testTrigger System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, You must ensure an accounting period exists and is open for the corresponding inventory movement date (default inventory movement date is today's date): [] Class.dlrs.RollupService.testHandler: line 282, column 1 Class.dlrs_AcctSeedERP_Inbound_Inventora3uTest.testTrigger: line 11, column 1
But the current Accounting Period is open and I am able to manually create IIMs with the default today's date. Any thoughts why it would be getting this error. It is a managed package, so I can't look at the code.
Same thing happens with the OIM. Thanks for any ideas.
-
Hi Charles,
We've had mixed success with DLRS + OIM and IIM. They both require a custom test class (vs. the basic DLRS one), because the test class doesn't create support records/objects the IIM and OIM need.
As an extra bit of information, in one org, even with the custom test class, the IIM trigger doesn't seem to fire correctly while the OIM does. We're probably going to build our own non-DLRS rollup trigger for them for that.
If you email me at my Coastal Cloud address, we can help you out with the DLRS test classes. Hopefully, they work for you. If not, we can help with a custom solution too.
Please sign in to leave a comment.
Comments
1 comment