{"title":"Codeunit 6257 SustCostManagement, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6257-sustcostmanagement/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":6257,"name":"SustCostManagement","app":"Sustainability","url":"https://jonas-paprotka.de/ref/codeunit/6257-sustcostmanagement/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6257-sustcostmanagement/source/","path":"src/Apps/W1/Sustainability/app/src/Calculation/SustCostManagement.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:27":{"name":"Item","url":"https://jonas-paprotka.de/ref/table/27-item/"}},"procs":[{"name":"UpdateCO2ePerUnit","line":7,"kind":"procedure","params":2,"steps":[[12,"call","CalcUnitCostFromAverageCost",1],[17,"write",27,"Modify",1],[19,"write",27,"Modify"]]},{"name":"CalcUnitCostFromAverageCost","line":22,"kind":"procedure","access":"local","params":1,"steps":[[26,"call","CalculateAverageCost",2]]},{"name":"CalculateAverageCost","line":32,"kind":"procedure","params":2,"steps":[[39,"call","ExcludeOpenOutbndCosts",3],[40,"call","CalculateQuantity",1],[40,"call","GetTransferQuantity",1],[43,"call","CalculateCostAmt",2],[43,"call","CalculateCostAmt",2]]},{"name":"CalculateQuantity","line":89,"kind":"procedure","access":"local","params":1,"steps":[[93,"call","SetFilters",2]]},{"name":"CalculateCostAmt","line":99,"kind":"procedure","access":"local","params":2,"steps":[[103,"call","SetFilters",2]]},{"name":"GetTransferQuantity","line":112,"kind":"procedure","access":"local","params":1,"steps":[[116,"call","SetFilters",2]]}]}