When quantity of a saved purchase order line is changed, currently AX automatically refreshes the unit price and discounts as per current data. This causes original unit prices being overwritten with prices applicable for current period. Final result is when supplier produces the invoice, mismatches between ordered amount and Invoice amount.
When we initially change the Quantity in PO line, the popup wont appear, but when we change the Unit price once and modify the Quantity again the popup will appear. The main logic for this popup written at \Data Dictionary\Tables\PurchLine\Methods\modifiedField :line 48.
So in order to achieve same functionality when creating PO line and changing the Quanity values, written same logic at \Data Dictionary\Tables\PurchLine\Methods\validateField
In order to get the popup we need to have the record in “PriceDiscPurchPolicyParameters” table.
This table will hold all the values of the Enum : “PriceDiscPurchasePromptSystemSource”. By default it will have all the records of Enum values but as we created the new Enum value for this change we need to create record in the table level.