Skip to main content
Solved

Type Name does not Exist Error

  • Feb 19, 2024 4:19 PM UTC
  • 6 replies
  • 331 views
  • Translate All

Michaelh
Pro III
Forum|alt.badge.img+3

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?

Best answer by Zoltan Febert

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:

 

View original

6 replies

Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+4

Hi @Michael Hansen,

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

Translate

Michaelh
Pro III
Forum|alt.badge.img+3
  • Author
  • Pro III
  • Feb 19, 2024 10:53 PM UTC

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

Translate

Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+4
  • Jr Varsity I
  • Answer
  • Feb 19, 2024 10:57 PM UTC

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:

 

Translate

Michaelh
Pro III
Forum|alt.badge.img+3
  • Author
  • Pro III
  • Feb 19, 2024 11:29 PM UTC

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.

Translate

Zoltan Febert
Jr Varsity I
Forum|alt.badge.img+4

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

 

Translate

Michaelh
Pro III
Forum|alt.badge.img+3
  • Author
  • Pro III
  • Feb 21, 2024 3:59 PM UTC

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

Translate