@John Kihiu This is a known compatibility issue that surfaces after Acumatica upgrades. Here's a full breakdown:
This is a SQL Server error, not an Acumatica application error. It occurs when Acumatica's customization tries to execute something like:
SELECT MAX(MyBooleanField) FROM MyTable
-- SQL Server does NOT support MAX() on a BIT column
-- This is a SQL Server limitation, not Acumatica's
Solution:
DAC Change
// BEFORE
[PXDBBool]
[PXUIField(DisplayName = "My Flag")]
public virtual bool? MyFlag { get; set; }
// AFTER
[PXDBInt]
[PXUIField(DisplayName = "My Flag")]
public virtual int? MyFlagInt { get; set; }
// Keep bool property for UI convenience
public virtual bool? MyFlag
{
get { return MyFlagInt == 1; }
set { MyFlagInt = value == true ? 1 : 0; }
}
Database Column Change (Most Thorough)
-- Change BIT column to INT in the database
ALTER TABLE [MyCustomTable]
ALTER COLUMN [MyBooleanField] INT NOT NULL DEFAULT 0;
-- Update existing values
UPDATE [MyCustomTable]
SET [MyBooleanField] = CASE
WHEN [MyBooleanField] = 1 THEN 1
ELSE 0
END;