{"title":"Codeunit 2005 Azure AI Usage Impl., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/2005-azure-ai-usage-impl/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":2005,"name":"Azure AI Usage Impl.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/2005-azure-ai-usage-impl/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/2005-azure-ai-usage-impl/source/","path":"src/Layers/W1/BaseApp/System/AI/AzureAIUsageImpl.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:2020":{"name":"Image Analysis Setup","url":"https://jonas-paprotka.de/ref/table/2020-image-analysis-setup/"},"table:2004":{"name":"Azure AI Usage","url":"https://jonas-paprotka.de/ref/table/2004-azure-ai-usage/"},"codeunit:457":{"name":"Environment Information","url":"https://jonas-paprotka.de/ref/codeunit/457-environment-information/"},"codeunit:2020":{"name":"Image Analysis Management","url":"https://jonas-paprotka.de/ref/codeunit/2020-image-analysis-management/"},"codeunit:2003":{"name":"ML Prediction Management","url":"https://jonas-paprotka.de/ref/codeunit/2003-ml-prediction-management/"}},"procs":[{"name":"SetInfiniteImageAnalysisAccess","line":19,"kind":"procedure","access":"internal","params":1,"steps":[[23,"ext","table",2020,"GetApiKeyAsSecret",0],[26,"call","SetImageAnalysisIsSetup",1],[27,"call","GetSingleInstance",2],[30,"write",2004,"Modify"]]},{"name":"IncrementTotalProcessingTime","line":41,"kind":"procedure","params":3,"steps":[[46,"call","GetSingleInstance",2],[48,"call","GetCurrentDateTime",0],[49,"write",2004,"Modify",1]]},{"name":"IsLimitReached","line":53,"kind":"procedure","params":2,"steps":[[57,"call","GetSingleInstance",2],[58,"call","GetTotalProcessingTime",1]]},{"name":"GetTotalProcessingTime","line":65,"kind":"procedure","params":1,"steps":[[69,"call","GetSingleInstance",2]]},{"name":"GetLimitPeriod","line":73,"kind":"procedure","params":1,"steps":[[77,"call","GetSingleInstance",2]]},{"name":"GetResourceLimit","line":81,"kind":"procedure","params":1,"steps":[[85,"call","GetSingleInstance",2]]},{"name":"GetLastTimeUpdated","line":89,"kind":"procedure","params":1,"steps":[[93,"call","GetSingleInstance",2]]},{"name":"GetSingleInstance","line":97,"kind":"procedure","params":2,"steps":[[113,"ext","codeunit",457,"IsSaaS",0],[120,"call","GetCurrentDateTime",0],[121,"write",2004,"Insert"],[134,"write",2020,"Insert"],[138,"ext","table",2020,"GetApiKeyAsSecret",0],[139,"ext","codeunit",457,"IsSaaS",0],[141,"ext","codeunit",2020,"GetImageAnalysisCredentials",4],[149,"ext","codeunit",2003,"GetMachineLearningCredentials",4],[159,"call","HasChangedYear",1],[161,"call","HasChangedMonth",1],[163,"call","HasChangedDay",1],[165,"call","HasChangedHour",1],[174,"write",2004,"Modify"]]},{"name":"HasChangedYear","line":184,"kind":"procedure","access":"internal","params":1,"steps":[[186,"call","HasChangedPeriod",2]]},{"name":"HasChangedMonth","line":189,"kind":"procedure","access":"internal","params":1,"steps":[[191,"call","HasChangedPeriod",2],[191,"call","HasChangedYear",1]]},{"name":"HasChangedDay","line":194,"kind":"procedure","access":"internal","params":1,"steps":[[196,"call","HasChangedPeriod",2],[196,"call","HasChangedMonth",1]]},{"name":"HasChangedPeriod","line":199,"kind":"procedure","access":"internal","params":2,"steps":[[201,"call","GetCurrentDateTime",0]]},{"name":"HasChangedHour","line":204,"kind":"procedure","access":"internal","params":1,"steps":[[210,"call","GetCurrentDateTime",0]]},{"name":"GetCurrentDateTime","line":214,"kind":"procedure","access":"internal","params":0,"steps":[[221,"event","OnAfterGetCurrentDateTime",0]]}]}