Skip to main content
Solved

Validation error for Customization

  • September 4, 2024
  • 3 replies
  • 76 views

bigred1022
Jr Varsity II
Forum|alt.badge.img

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:

[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.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.  

Best answer by Keith Richardson

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

View original
Did this topic help you find an answer to your question?

3 replies

Keith Richardson
Semi-Pro I
Forum|alt.badge.img+2

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


bigred1022
Jr Varsity II
Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • 31 replies
  • September 4, 2024

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?


Keith Richardson
Semi-Pro I
Forum|alt.badge.img+2

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings