{"title":"Codeunit 6218 Sustainability Calc. Mgt., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6218-sustainability-calc-mgt/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":6218,"name":"Sustainability Calc. Mgt.","app":"Sustainability","url":"https://jonas-paprotka.de/ref/codeunit/6218-sustainability-calc-mgt/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6218-sustainability-calc-mgt/source/","path":"src/Apps/W1/Sustainability/app/src/Calculation/SustainabilityCalcMgt.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":{"codeunit:6215":{"name":"Sustainability Calculation","url":"https://jonas-paprotka.de/ref/codeunit/6215-sustainability-calculation/"},"table:6214":{"name":"Sustainability Jnl. Line","url":"https://jonas-paprotka.de/ref/table/6214-sustainability-jnl-line/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"page:6224":{"name":"Collect Amount from G/L Entry","url":"https://jonas-paprotka.de/ref/page/6224-collect-amount-from-g-l-entry/"},"table:6260":{"name":"Sust. Jnl. Line G/L Entry","url":"https://jonas-paprotka.de/ref/table/6260-sust-jnl-line-g-l-entry/"}},"procs":[{"name":"CalculationEmissions","line":17,"kind":"procedure","access":"internal","params":1,"steps":[[23,"event","OnBeforeCalculationEmissions",1]]},{"name":"CalculationEmissions","line":34,"kind":"procedure","access":"internal","params":3,"steps":[[46,"ext","codeunit",6215,"CalculateScope1Emissions",3],[49,"ext","codeunit",6215,"CalculateScope2Emissions",3],[52,"ext","codeunit",6215,"CalculateScope3Emissions",3],[55,"ext","codeunit",6215,"CalculateWaterOrWaste",3],[59,"validate",6214,"Emission CO2"],[62,"validate",6214,"Emission CH4"],[65,"validate",6214,"Emission N2O"],[68,"validate",6214,"Water Intensity"],[71,"validate",6214,"Waste Intensity"],[74,"validate",6214,"Discharged Into Water"]]},{"name":"CalculationEmissions","line":88,"kind":"procedure","access":"internal","params":3,"steps":[[97,"ext","codeunit",6215,"CalculateScope1Emissions",3],[99,"ext","codeunit",6215,"CalculateScope2Emissions",3],[101,"ext","codeunit",6215,"CalculateScope3Emissions",3],[103,"ext","codeunit",6215,"CalculateWaterOrWaste",3],[107,"validate",39,"Emission CO2"],[110,"validate",39,"Emission CH4"],[113,"validate",39,"Emission N2O"]]},{"name":"GetFormulaInputEditability","line":141,"kind":"procedure","access":"local","params":7,"steps":[[152,"call","GetCalculationParameters",3]]},{"name":"GetCollectableGLAmount","line":222,"kind":"procedure","params":3,"steps":[[226,"call","FilterGLEntry",4],[227,"call","GetTotalGLEntryAmount",1]]},{"name":"CollectGeneralLedgerAmount","line":230,"kind":"procedure","access":"internal","params":1,"steps":[[238,"validate",6214,"Custom Amount"],[243,"call","SetCollectingJournalLine",1],[245,"ext","page",6224,"SetCollectingJournalLine",1],[249,"ext","page",6224,"GetDates",2],[251,"call","FilterGLEntry",4],[252,"validate",6214,"Custom Amount"],[252,"call","GetTotalGLEntryAmount",1],[253,"ext","table",6214,"SetGLCollectionInformation",2],[255,"ext","table",6260,"StoreCollectedGLEntries",2]]},{"name":"FilterGLEntry","line":264,"kind":"procedure","access":"internal","params":4,"steps":[[273,"event","OnAfterFilterGLEntry",0],[275,"call","MarkCollectableGLEntries",4]]},{"name":"MarkCollectableGLEntries","line":278,"kind":"procedure","access":"local","params":4,"steps":[[282,"call","AddPostedGLEntryNos",4],[283,"call","AddGLEntryNosCollectedOnOtherJournalLines",4]]},{"name":"AddGLEntryNosCollectedOnOtherJournalLines","line":311,"kind":"procedure","access":"local","params":4,"steps":[[321,"ext","table",6260,"BelongsToJournalLine",1]]}]}