Tuesday, May 6, 2014

Error when creating a new PO - Pending or posted invoiced exist for the purchase order


Version of AX: 2012 R2
Localization: Thai

While trying to create a new Purchase order, AX threw an error as follows:

"Pending or posted invoiced exist for the purchase order. Changing the currency or vendor not allowed."

I am trying to create a new PO and it seems it already has a pending invoice. What are the odds? Weird!!!

Figured out that it was an error message that was not appropriate to the root cause. The problem was with the number sequence attached to the PO. It was set to manual and hence was not getting generated.

When it was changed to non-manual / continuous, this error was not appearing any longer.

Wednesday, April 16, 2014

Upload Purchase Order to AX 2012 Using Excel Add-in

Version of AX: 2012 R2
Localization: Thai

Using the excel add-ins we imported the purchase order header and purchase lines to AX. It worked perfectly without any errors. The users were able to confirm the PO from the client too.

However, there was a situation where the user missed the tax group and wanted to edit the purchase line before confirming. When they edited a field in the line and tried saving it, an error popped up with the messages: 

Field 'Company ID' must be filled in.
Field 'Lot ID' must be filled in.















This error was driving us all crazy, as there is no company ID in 'PurchLine' table and the lot ID was already generated in 'PurchLine' table as well. Situation got worse as the users who were able to confirm the POs without editing the lines, were not able to post 'Product receipts' by entering a qty in the 'receive now' field.

Finally after a lot of research, figured out that another table had to be added to the template and had to be updated viz. 'PurchLineForeignTradeCategory'. 

Solution:

  • Include the 'Lot ID' and 'Company ID' fields of this table to the excel template. 
  • After publishing the 'PurchLine' table, use the Lot ID from that sheet and update the 'PurchLineForeignTradeCategory' table.