NullPointerExpection on Custom OrderTypes in Purchase Orders
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.
Page 1 / 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
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.