Skip to main content

Hello,

I am trying to make two checkboxes (Don’t Print and Don’t Email) on AR30100 “unchecked” by default.

I created a customization project and here is what I am changing (Setting PXDefault(false))

 

 

When I go to publish, I get this error:

r2024-09-04 17:25:16.279] \App_RuntimeCode\PX_Objects_AR_ARInvoice_extensions.cs(33): error CS0246: The type or namespace name 'isMigratedRecord' could not be found (are you missing a using directive or an assembly reference?)
<2024-09-04 17:25:16.279] \App_RuntimeCode\PX_Objects_AR_ARInvoice_extensions.cs(42): error CS0246: The type or namespace name 'isMigratedRecord' could not be found (are you missing a using directive or an assembly reference?)
<2024-09-04 17:25:16.279] \App_RuntimeCode\PX_Objects_AR_ARInvoice_extensions.cs(33): error CS0246: The type or namespace name 'isMigratedRecord' could not be found (are you missing a using directive or an assembly reference?)
<2024-09-04 17:25:16.294] Compiler time, in seconds: 9.0936508
<2024-09-04 17:25:16.560] Validation failed.

I have attached the project.  

I would remove the PXFormulaDefault from the new attribute and give it a try.


Thank you @Keith Richardson , that did the trick.  In trying to understand customizations a little more, can you explain what that part of the attribute was doing?


That attribute is default attribute that executes a formula. Acumatica’s tooltip states “ A PXDefault-like attribute supporting arbitrary BQL formulas as the providers of the default value.”  This would be redundant, as you have new logic to always make it false.

This code is checking the that if the field isMigrated is true, or the current customer’s PrintInvoices  is set to true, set it to false (Meaning it will want to print).

If you needed this attribute, you would need to specify it as ARInvoice.isMigratedRecord and it would compile. Because this is an extension, you need to fully qualify the reference. 


Reply