Saturday, 30 June 2007

Update Unit Price in Item Card

When you update the Unit Price field in the Item Card, the Profit% field will be updated automatically based on the Price/Profit Calculation field. The code to update the Profit% field can be found in the Unit Price OnValidate trigger. Besides the Profit%, the Last Date Modified field is updated as well. Please note that, Navision only issue one SQL statement to update the 3 fields at once. If you have captured this changes in Change Log, you can see that the change Time are the same for the three fields.

The SQL statement generated from my test data is as follow.

UPDATE "CRONUS Malaysia Sdn_ Bhd_$Item" WITH (REPEATABLEREAD) SET "Unit Price"=2.7,"Profit %"=48.14815,"Last Date Modified"={ts '2007-06-30 00:00:00.000'} WHERE ("No_"='70105') AND ("timestamp"<=0x000000000001A698)

1 comment:

ganix said...

How to configure item (product) expired date in nav.

it's need for us.