All,
We’re currently on 23R2 and in the process of upgrading to 24R2, testing it on the supplied sandbox.
One change we noted (I think this happened back in 24R1) -- customers on credit hold are now selectable from the Customer field in the sales order screen. We DO NOT want to place orders for Customers on credit hold. :)
So I changed the code (probably incorrectly)
original attribute:
[PXDefault]
[Customer(
typeof(Search<BAccountR.bAccountID, Where<True, Equal<True>>>), // TODO: remove fake Where after AC-101187
Visibility = PXUIVisibility.SelectorVisible,
DescriptionField = typeof(Customer.acctName),
Filterable = true)]
[CustomerOrOrganizationInNoUpdateDocRestrictor]
[PXRestrictor(typeof(Where<Optional<SOOrder.isTransferOrder>, Equal<True>,
Or<Customer.status, IsNull,
Or<Customer.status, Equal<CustomerStatus.active>,
Or<Customer.status, Equal<CustomerStatus.oneTime>,
Or<Customer.status, Equal<CustomerStatus.creditHold>>>>>>),
AR.Messages.CustomerIsInStatus,
typeof(Customer.status))]
[PXForeignReference(typeof(Field<SOOrder.customerID>.IsRelatedTo<BAccount.bAccountID>))]
new attribute:
[PXDefault]
[Customer(
typeof(Search<BAccountR.bAccountID, Where<True, Equal<True>>>), // TODO: remove fake Where after AC-101187
Visibility = PXUIVisibility.SelectorVisible,
DescriptionField = typeof(Customer.acctName),
Filterable = true)]
[CustomerOrOrganizationInNoUpdateDocRestrictor]
[PXRestrictor(typeof(Where<Optional<SOOrder.isTransferOrder>, Equal<True>,
Or<Customer.status, IsNull,
Or<Customer.status, Equal<CustomerStatus.active>,
Or<Customer.status, Equal<CustomerStatus.oneTime>>>>>),
AR.Messages.CustomerIsInStatus,
typeof(Customer.status))]
[PXForeignReference(typeof(Field<SOOrder.customerID>.IsRelatedTo<BAccount.bAccountID>))]
I simply removed the Or<Customer.status, Equal<CustomerStatus.oneTime> from the restrictor.
But the validation fails with the following:
\App_RuntimeCode\PX_Objects_SO_SOOrder_extensions.cs(49): error CS0122: 'CustomerOrOrganizationInNoUpdateDocRestrictorAttribute' is inaccessible due to its protection level
\App_RuntimeCode\PX_Objects_SO_SOOrder_extensions.cs(49): error CS0122: 'CustomerOrOrganizationInNoUpdateDocRestrictorAttribute' is inaccessible due to its protection level
[2025-03-12 14:26:46.620] Compiler time, in seconds: 5.1147322
[2025-03-12 14:26:46.625] Validation failed.

Any help appreciated. :)