Skip to main content
Solved

Duplicate field Data Access error after adding Custom Field and Control

  • December 5, 2022
  • 4 replies
  • 215 views

Hi,

I’m getting the following error after adding a field and controls to a screen. The fields is just a checkbox (boolean) with a checkbox ui control.

 

There is a control on another form that has the same name’ I didn’t expect it to cause an issue however now it doesn’t compile and gives the following error:

 

Building directory '\WebSiteValidationDomain\App_RuntimeCode\'.
\App_RuntimeCode\PX_Objects_CR_BAccount_extensions.cs(45): error CS0579: Duplicate 'PXDBBool' attribute
\App_RuntimeCode\PX_Objects_CR_BAccount_extensions.cs(46): error CS0579: Duplicate 'PXUIField' attribute
\App_RuntimeCode\PX_Objects_CR_BAccount_extensions.cs(45): error CS0579: Duplicate 'PXDBBool' attribute

 

Does anyone know how to resolve this issue? I’ve looked in the file specified and only see a single entry for the boolean field I added.

Best answer by daronjones

I managed to find out the problem. It was this (inside the Data Access area of the customisation project:

[PXDBBool]
[PXUIField(DisplayName="Foo Bar")]
[PXDBBool]
[PXUIField(DisplayName="FooBar")]

Removing the duplicate fixed the problem:

[PXDBBool]
[PXUIField(DisplayName="Foo Bar")]

 

4 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • December 6, 2022

Hi @daronjones  Can you please share the customization package here.


  • Author
  • Freshman II
  • Answer
  • December 6, 2022

I managed to find out the problem. It was this (inside the Data Access area of the customisation project:

[PXDBBool]
[PXUIField(DisplayName="Foo Bar")]
[PXDBBool]
[PXUIField(DisplayName="FooBar")]

Removing the duplicate fixed the problem:

[PXDBBool]
[PXUIField(DisplayName="Foo Bar")]

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • December 6, 2022

Okay @daronjones  Thanks for sharing the update


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • December 6, 2022

Thank you for sharing your solution with the community @daronjones !