when tab changes value has to change

I am new to AX

currently working on AX 2009. I have a scenario that in the form when i enter a record in the form if i enter a field1 value when the tab changes the value should automatically updated according to the field1 value

for example if i give 100 in field1 when tab changes to second field value should automatically come as 110 (10% should be added) in the second field.

please tell me how to write and where to write code

thanks in advance


If the same logic should happen in any form using your table, implement it in modifiedField() method directly on the table. If it’s specific to that particular form, override modified() method of the form datasource field.