Solved

Type Name does not Exist Error

  • 19 February 2024
  • 6 replies
  • 53 views

Userlevel 5
Badge

I’m trying to enable a field for edits during any document state.

  • I created the field.
  • I made it into a ComboBox
  • I added it to a screen
  • I enabled it via the workflows to be editable
  • I cannot get the cache to unlock though

 

Attached is my error:
 

 

But that field exists and does have that name:

 

 

Did I mistype the cache segment? 

 

I selected the field, I chose EVENTS, I chose ROW SELECTED, I chose ADD HANDLER, KEEP BASE METHOD.

I then inserted two lines into that generated code brick:

      if (row == null) return;

      PXUIFieldAttribute.SetEnabled<ARInvoiceExt.usrIsRebate>(cache, row, true);

 

Can someone save me here?

icon

Best answer by Zoltan Febert 19 February 2024, 23:57

View original

6 replies

Userlevel 6
Badge +3

Hi @Michael Hansen,

Your field is created in ARRegisterExt class, you need to use ARRegisterExt.usrIsRebate in your RowSelected Event.

Userlevel 5
Badge

Thank you kind sir! What tipped you off to knowing that? I’d like come better prepared for my next adventure.

Userlevel 6
Badge +3

I always use extension libraries instead of customization editor, so it was easy to find the class name in the source code. However, you can also see it in the customization project editor, there is no customized AR.Invoice there, only AR.Register:

 

Userlevel 5
Badge

I must be the luckiest idiot in the world. All my previous segments just happened to match (Purchase Orders being POOrder and POOrderExt). Thank you for this insight, I assumed it was the name given in the variable call:

var row = (ARInvoice)e.row;

I will use the Data Access names going forward.

Marked you as best answer.

Userlevel 6
Badge +3

Hi @Michael Hansen, I found another way to find out the field name:

 

Userlevel 5
Badge

Even better thank you! I wish I could mark two answers here!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved