Solved

NullPointerExpection on Custom OrderTypes in Purchase Orders

  • 31 October 2023
  • 2 replies
  • 48 views

Userlevel 2
Badge

Hi everyone,

I have been assigned to create a new order type for Purchase Orders screen and do use a custom numbering attribute for a certain type.

So when I created a new numbering sequence and the necessary code below, but when I try to select a vendor from the selector I get this error:

the code looks like this:

for the POSetup’s DAC Extension: for the new numbering Sequence:

And for the POOrder Extension:

 

For the POOrderTypeExtension:

 

For the CustomNumberingPOAttribute:

So if you guys can possibly point out something that I might have been missing, I would really appreciate it.

 

Looking forward to reviews from the amazing community.

icon

Best answer by jdeol 13 November 2023, 16:13

View original

2 replies

Userlevel 4
Badge +1

Hi @jdeol,
Did you make the proper database changes for the POSetup’s DAC Extension so that the bound field would actually have something to bind to? 

I tried to reproduce the issue on my end but wasn’t able to get the DomesticRawMatPO option to show up in the Order Type dropdown. I tried to add the code you provided to my project but it didn’t change what I could select in Order Type dropdown. If you can provide more context around how to reproduce your issue perhaps I can take a closer look. Also, in the future, adding your code with the button designed for that would be useful as it allows for easy copy/pasting. Here is an image of the button I'm talking about.
 

 

Best of luck!

Philip Engesser

Userlevel 2
Badge

Thanks for the help @paengesser82,

 

I tried debugging it and it comes out that changing the way of PO Type causes issues way down in the workflow services.

What I wanted was add more dropdown option to the OrderType and change the OrderNumbering from the POSetup. And the error was coming up when trying to select a vendor that is when the error showed up.,

I did check the Database for the POSetup and other custom fields and they were fine.

 

Since the requirements for this customization changed.

Now I created a new Field on POOrder : UsrCustomOrderType which would be a drop down list

and then created a RowPersisting event that checks that if there is no orderNbr assigned use the DropDown value and set a numberingID for the orderNbr.

 

Also thanks for pointing out pasting the code, I will keep that in mind.

Cheers,

@jdeol 

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