Sales order question

Hello! I am wondering if anyone know if it is possible to set the Unit Price to 0 (by code) while the user is entering an Item in the Sales order form? Navison get the Unit Price from the item card, but in some cases I would like the price to be set to 0…

Yes its possible. You need to check exactly what you want, and especially the version you are in, since the Unit Price validation changes from version to version. Assuming you are on a newer version with Sales Price and Sales Dicount tables. Just find the code where Navision searches for those prices (its very different even from 3.60 to 3.70) and at that point put in your conditional, and set it to zero.

Hi David! Thank you for your answer! After quite a few F8 pushes I found the code:) Best Regards,

You’re welcome. By the way, make sure to test validation scenarios, since there are a number for different ways to trigger the Price update, (discount % etc.) My guess is you are trying to set the price to zero to force the user to enter a price, if so, make sure that your trigger is at a point that the price will not be changed if they use a different entry order sequence, and don’t forget a flag that will make sure that validation does not delete the price once the user has entered the new value.