Fix 'cannot determine default entity' error on New Batch page
authorJon Goldberg <jon@megaphonetech.com>
Fri, 16 Dec 2022 15:24:30 +0000 (10:24 -0500)
committerJon Goldberg <jon@megaphonetech.com>
Fri, 16 Dec 2022 15:24:30 +0000 (10:24 -0500)
CRM/Batch/Form/Batch.php

index 3f4b34af52491a669555909741ea23a0c3c2805b..2f53b43f6ceff6aa2e351b31d6165ef42a9c6540 100644 (file)
@@ -18,6 +18,13 @@ class CRM_Batch_Form_Batch extends CRM_Admin_Form {
 
   protected $submittableMoneyFields = ['total'];
 
+  /**
+   * Explicitly declare the entity api name.
+   */
+  public function getDefaultEntity() {
+    return 'Batch';
+  }
+
   /**
    * PreProcess function.
    */