{"title":"Codeunit 5640 Duplicate Depr. Book, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5640-duplicate-depr-book/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":5640,"name":"Duplicate Depr. Book","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5640-duplicate-depr-book/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5640-duplicate-depr-book/source/","path":"src/Layers/W1/BaseApp/FixedAssets/Depreciation/DuplicateDeprBook.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"table:5635":{"name":"Insurance Journal Line","url":"https://jonas-paprotka.de/ref/table/5635-insurance-journal-line/"},"codeunit:5652":{"name":"Insurance Jnl.-Post Line","url":"https://jonas-paprotka.de/ref/codeunit/5652-insurance-jnl-post-line/"},"codeunit:5639":{"name":"FA Get Journal","url":"https://jonas-paprotka.de/ref/codeunit/5639-fa-get-journal/"},"table:5605":{"name":"FA Journal Setup","url":"https://jonas-paprotka.de/ref/table/5605-fa-journal-setup/"},"table:81":{"name":"Gen. Journal Line","url":"https://jonas-paprotka.de/ref/table/81-gen-journal-line/"},"table:5621":{"name":"FA Journal Line","url":"https://jonas-paprotka.de/ref/table/5621-fa-journal-line/"}},"procs":[{"name":"DuplicateGenJnlLine","line":36,"kind":"procedure","params":2,"steps":[[40,"event","OnBeforeGenJnlLineDuplicate",0],[45,"call","InsertInsurance",3],[50,"call","GetExchangeRate",2],[53,"call","CreateLine",3],[54,"event","OnDuplicateGenJnlLineOnAfterCreateLine",0],[62,"call","CreateLine",3]]},{"name":"DuplicateFAJnlLine","line":66,"kind":"procedure","params":1,"steps":[[70,"event","OnBeforeDuplicateFAJnlLine",0],[73,"call","InsertInsurance",3],[79,"call","GetExchangeRate",2],[82,"call","CreateLine",3],[90,"call","CreateLine",3]]},{"name":"InsertInsurance","line":94,"kind":"procedure","access":"local","params":3,"steps":[[103,"call","InitInsuranceJnlLine",1],[111,"validate",5635,"Insurance No."],[112,"validate",5635,"FA No."],[116,"validate",5635,"Amount"],[135,"validate",5635,"Insurance No."],[136,"validate",5635,"FA No."],[138,"validate",5635,"Amount"],[152,"ext","codeunit",5652,"RunWithCheck",1],[156,"ext","table",5635,"CreateDimFromDefaultDim",0],[157,"write",5635,"Insert",1]]},{"name":"InitInsuranceJnlLine","line":161,"kind":"procedure","params":1,"steps":[[165,"ext","codeunit",5639,"InsuranceJnlName",3],[169,"ext","codeunit",5639,"SetInsuranceJnlRange",3],[171,"ext","table",5605,"GetInsuranceNoSeries",1]]},{"name":"CreateLine","line":174,"kind":"procedure","access":"local","params":3,"steps":[[179,"event","OnBeforeCreateLine",1],[187,"ext","codeunit",5639,"JnlName",6],[196,"ext","codeunit",5639,"JnlName",6],[200,"call","InsertLine",4]]},{"name":"MakeGenJnlLine","line":203,"kind":"procedure","access":"local","params":2,"steps":[[218,"validate",81,"Amount"],[221,"validate",81,"Correction"],[234,"event","OnAfterMakeGenJnlLine",0]]},{"name":"MakeFAJnlLine","line":237,"kind":"procedure","access":"local","params":2,"steps":[[251,"validate",5621,"Amount"],[254,"validate",5621,"Correction"],[267,"event","OnAfterMakeFAJnlLine",0]]},{"name":"AdjustGenJnlLine","line":270,"kind":"procedure","access":"local","params":1,"steps":[[290,"validate",81,"Amount"],[293,"validate",81,"Correction"],[306,"event","OnAfterAdjustGenJnlLine",0]]},{"name":"AdjustFAJnlLine","line":309,"kind":"procedure","access":"local","params":1,"steps":[[328,"validate",5621,"Amount"],[331,"validate",5621,"Correction"],[344,"event","OnAfterAdjustFAJnlLine",0]]},{"name":"CalcExchangeRateAmount","line":347,"kind":"procedure","access":"local","params":4,"steps":[[353,"call","GetExchangeRate",2],[355,"validate",81,"Amount"],[356,"validate",81,"Salvage Value"],[359,"validate",5621,"Amount"],[360,"validate",5621,"Salvage Value"]]},{"name":"InsertLine","line":378,"kind":"procedure","access":"local","params":4,"steps":[[381,"call","AdjustGenJnlLine",1],[385,"ext","codeunit",5639,"SetGenJnlRange",3],[386,"validate",81,"Depreciation Book Code"],[387,"call","CalcExchangeRateAmount",4],[388,"ext","table",5605,"GetGenNoSeries",1],[389,"ext","table",5605,"SetGenJnlTrailCodes",1],[391,"ext","table",81,"CreateDimFromDefaultDim",1],[393,"event","OnBeforeGenJnlLineInsert",0],[394,"write",81,"Insert",1],[398,"call","MakeFAJnlLine",2],[402,"ext","codeunit",5639,"SetFAJnlRange",3],[403,"validate",5621,"Depreciation Book Code"],[404,"call","CalcExchangeRateAmount",4],[405,"ext","table",5605,"GetFANoSeries",1],[406,"ext","table",5605,"SetFAJnlTrailCodes",1],[408,"ext","table",5621,"CreateDimFromDefaultDim",0],[410,"event","OnBeforeFAJnlLineInsert",0],[411,"write",5621,"Insert",1],[415,"call","MakeGenJnlLine",2],[419,"ext","codeunit",5639,"SetGenJnlRange",3],[420,"validate",81,"Depreciation Book Code"],[421,"call","CalcExchangeRateAmount",4],[422,"ext","table",5605,"GetGenNoSeries",1],[423,"ext","table",5605,"SetGenJnlTrailCodes",1],[425,"ext","table",81,"CreateDimFromDefaultDim",1],[427,"event","OnBeforeGenJnlLineInsert",0],[428,"write",81,"Insert",1],[432,"call","AdjustFAJnlLine",1],[436,"ext","codeunit",5639,"SetFAJnlRange",3],[437,"validate",5621,"Depreciation Book Code"],[438,"call","CalcExchangeRateAmount",4],[439,"ext","table",5605,"GetFANoSeries",1],[440,"ext","table",5605,"SetFAJnlTrailCodes",1],[442,"ext","table",5621,"CreateDimFromDefaultDim",0],[444,"event","OnBeforeFAJnlLineInsert",0],[445,"write",5621,"Insert",1]]}]}