Copy record

Hello, (question for Navision 2.6) sometimes, we buy big quantity of same fixed asset (all field except No. are the same) So, I would to do an automatic copy of the first created fixed asset. For that, I simply do transferfield, inserttrue, … And I would copy the “FA Depreciation Book” record too But on this table, we have a lot of OnValidate, to make modify on other table). So with a transferfields, onvalidate are not triggered And the only solution I find is to hard coding all the validate,but, it not the good solution, there is a big lot of onvalidate :confused: Is there a better solution?? Thx

Hi Geoffrey, The coding a lot of times is just a copy of what you would do manually. You have to think of the steps you take when you create manually a fixed asset and a depreciation book and reproduce that code. So instead of transferfields, just do Init, validate the fields that matter only and then Insert. Sometimes it helps if you do Init, Insert(true) first then validate and Modify(true) because sometimes the validate code may be looking for the rec … Hope this helps. Cristi Nicola