diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php
index d79cf9747edce89cd895f292059d296fa95d5d61..73944a1e7280881e155d8ace80112d268c39a14a 100644
--- a/CRM/Core/BAO/CustomField.php
+++ b/CRM/Core/BAO/CustomField.php
@@ -1653,7 +1653,9 @@ SELECT $columnName
       'table_name' => $tableName,
       'column_name' => $columnName,
       'file_id' => $fileID,
+      // is_multiple refers to the custom group, serialize refers to the field.
       'is_multiple' => $customFields[$customFieldId]['is_multiple'],
+      'serialize' => $customFields[$customFieldId]['serialize'],
     ];
 
     //we need to sort so that custom fields are created in the order of entry
diff --git a/CRM/Core/BAO/CustomValueTable.php b/CRM/Core/BAO/CustomValueTable.php
index fa5373b087765ae03dab245508a8bcf3165b5aed..8556c4ec217b11812661f23ce4725864a2da51f2 100644
--- a/CRM/Core/BAO/CustomValueTable.php
+++ b/CRM/Core/BAO/CustomValueTable.php
@@ -229,7 +229,7 @@ class CRM_Core_BAO_CustomValueTable {
             // would be 'String' for a concatenated set of integers.
             // However, the god-forsaken timestamp hack also needs to be kept
             // if value is NULL.
-            $params[$count] = [$value, ($value && $field['is_multiple']) ? 'String' : $type];
+            $params[$count] = [$value, ($value && $field['serialize']) ? 'String' : $type];
             $count++;
           }
 
@@ -361,7 +361,10 @@ class CRM_Core_BAO_CustomValueTable {
           'custom_group_id' => $customValue['custom_group_id'],
           'table_name' => $customValue['table_name'],
           'column_name' => $customValue['column_name'],
-          'is_multiple' => $customValue['is_multiple'] ?? NULL,
+          // is_multiple refers to the custom group, serialize refers to the field.
+          // @todo is_multiple can be null - does that mean anything different from 0?
+          'is_multiple' => $customValue['is_multiple'] ?? CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customValue['custom_group_id'], 'is_multiple'),
+          'serialize' => $customValue['serialize'] ?? (int) CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', $customValue['custom_field_id'], 'serialize'),
           'file_id' => $customValue['file_id'],
         ];
 
@@ -592,7 +595,8 @@ SELECT cg.table_name  as table_name ,
        cf.column_name as column_name,
        cf.id          as cf_id      ,
        cf.html_type   as html_type  ,
-       cf.data_type   as data_type
+       cf.data_type   as data_type  ,
+       cf.serialize   as serialize
 FROM   civicrm_custom_group cg,
        civicrm_custom_field cf
 WHERE  cf.custom_group_id = cg.id
@@ -650,6 +654,7 @@ AND    cf.id IN ( $fieldIDList )
           'table_name' => $dao->table_name,
           'column_name' => $dao->column_name,
           'is_multiple' => $dao->is_multiple,
+          'serialize' => $dao->serialize,
           'extends' => $dao->extends,
         ];
 
diff --git a/tests/phpunit/CRM/Core/BAO/CustomValueTableTest.php b/tests/phpunit/CRM/Core/BAO/CustomValueTableTest.php
index c27ac83d878373c092ffbf304e2b7e52e72a28d9..ba5bfedaa4028cbf03d7618f7639c214145e78e6 100644
--- a/tests/phpunit/CRM/Core/BAO/CustomValueTableTest.php
+++ b/tests/phpunit/CRM/Core/BAO/CustomValueTableTest.php
@@ -179,6 +179,52 @@ class CRM_Core_BAO_CustomValueTableTest extends CiviUnitTestCase {
     $this->contactDelete($contactID);
   }
 
+  /**
+   * Test store function for multiselect int.
+   */
+  public function testStoreMultiSelectInt() {
+    $contactID = $this->individualCreate();
+    $customGroup = $this->customGroupCreate();
+    $fields = [
+      'custom_group_id' => $customGroup['id'],
+      'data_type' => 'Int',
+      'html_type' => 'Multi-Select',
+      'option_values' => [
+        1 => 'choice1',
+        2 => 'choice2',
+      ],
+      'default_value' => '',
+    ];
+
+    $customField = $this->customFieldCreate($fields);
+
+    $params = [
+      [
+        $customField['id'] => [
+          'value' => CRM_Core_DAO::VALUE_SEPARATOR . '1' . CRM_Core_DAO::VALUE_SEPARATOR . '2' . CRM_Core_DAO::VALUE_SEPARATOR,
+          'type' => 'Int',
+          'custom_field_id' => $customField['id'],
+          'custom_group_id' => $customGroup['id'],
+          'table_name' => $customGroup['values'][$customGroup['id']]['table_name'],
+          'column_name' => $customField['values'][$customField['id']]['column_name'],
+          'file_id' => '',
+        ],
+      ],
+    ];
+
+    CRM_Core_BAO_CustomValueTable::store($params, 'civicrm_contact', $contactID);
+
+    $customData = \Civi\Api4\Contact::get(FALSE)
+      ->addSelect('new_custom_group.Custom_Field')
+      ->addWhere('id', '=', $contactID)
+      ->execute()->first();
+    $this->assertEquals([1, 2], $customData['new_custom_group.Custom_Field']);
+
+    $this->customFieldDelete($customField['id']);
+    $this->customGroupDelete($customGroup['id']);
+    $this->contactDelete($contactID);
+  }
+
   /**
    * Test getEntityValues function for stored value.
    */