{"title":"Codeunit 2020 Image Analysis Management, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/2020-image-analysis-management/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":2020,"name":"Image Analysis Management","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/2020-image-analysis-management/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/2020-image-analysis-management/source/","path":"src/Layers/W1/BaseApp/System/AI/ImageAnalysis/ImageAnalysisManagement.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/"},"codeunit:2006":{"name":"Azure AI Usage","url":"https://jonas-paprotka.de/ref/codeunit/2006-azure-ai-usage/"},"codeunit:457":{"name":"Environment Information","url":"https://jonas-paprotka.de/ref/codeunit/457-environment-information/"},"codeunit:419":{"name":"File Management","url":"https://jonas-paprotka.de/ref/codeunit/419-file-management/"},"codeunit:2021":{"name":"Image Analysis Result","url":"https://jonas-paprotka.de/ref/codeunit/2021-image-analysis-result/"},"codeunit:2024":{"name":"Image Analysis Wrapper V1.0","url":"https://jonas-paprotka.de/ref/codeunit/2024-image-analysis-wrapper-v1-0/"},"codeunit:2200":{"name":"Azure Key Vault","url":"https://jonas-paprotka.de/ref/codeunit/2200-azure-key-vault/"},"codeunit:2004":{"name":"Machine Learning KeyVaultMgmt.","url":"https://jonas-paprotka.de/ref/codeunit/2004-machine-learning-keyvaultmgmt/"},"codeunit:501":{"name":"OAuth2","url":"https://jonas-paprotka.de/ref/codeunit/501-oauth2/"}},"procs":[{"name":"Initialize","line":52,"kind":"procedure","params":1,"steps":[[63,"write",2020,"Insert"],[67,"ext","table",2020,"GetApiKeyAsSecret",0],[69,"ext","codeunit",2006,"SetImageAnalysisIsSetup",1],[71,"ext","codeunit",2006,"SetImageAnalysisIsSetup",1],[77,"ext","codeunit",2006,"GetLimitPeriod",1],[78,"ext","codeunit",2006,"GetResourceLimit",1],[82,"call","SetLimitInYears",1],[84,"ext","codeunit",457,"IsSaaS",0],[85,"call","TryAcquireOAuth2Token",4],[86,"call","GetImageAnalysisCredentials",4]]},{"name":"SetMedia","line":95,"kind":"procedure","params":1,"steps":[[102,"ext","codeunit",419,"ServerTempFileName",0]]},{"name":"SetImagePath","line":109,"kind":"procedure","params":1,"steps":[[113,"ext","codeunit",419,"IsAllowedPath",2]]},{"name":"SetBlob","line":117,"kind":"procedure","params":1,"steps":[[121,"ext","codeunit",419,"ServerTempFileName",0],[122,"ext","codeunit",419,"BLOBExportToServerFile",2]]},{"name":"AnalyzeTags","line":172,"kind":"procedure","params":1,"steps":[[174,"call","Analyze",2]]},{"name":"AnalyzeColors","line":177,"kind":"procedure","params":1,"steps":[[179,"call","Analyze",2]]},{"name":"AnalyzeFaces","line":182,"kind":"procedure","params":1,"steps":[[184,"call","Analyze",2]]},{"name":"Analyze","line":195,"kind":"procedure","params":2,"steps":[[201,"call","Initialize",0],[202,"call","SetLastError",2],[203,"event","OnBeforeImageAnalysis",0],[206,"ext","table",2020,"IsUsageLimitReached",3],[210,"call","SetLastError",2],[213,"call","SetLastError",2],[215,"ext","table",2020,"IsUsageLimitReached",3],[216,"call","SetLastError",2],[218,"call","InvokeAnalysisWithAuth",6],[219,"ext","table",2020,"Increment",0],[222,"call","SetLastError",2],[224,"call","SetLastError",2],[226,"ext","codeunit",2021,"SetResult",2],[227,"event","OnAfterImageAnalysis",0],[229,"call","HasError",0]]},{"name":"SetHttpMessageHandler","line":233,"kind":"procedure","params":1,"steps":[[238,"ext","codeunit",2024,"SetHttpMessageHandler",1]]},{"name":"GetLastError","line":248,"kind":"procedure","params":2,"steps":[[252,"call","HasError",0]]},{"name":"TryAcquireOAuth2Token","line":310,"kind":"procedure","access":"local","params":4,"steps":[[329,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[333,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[335,"ext","codeunit",2200,"GetAzureKeyVaultCertificate",2],[337,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[339,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[349,"call","ExtractParameterValue",3],[350,"call","ExtractParameterValue",3],[351,"call","ExtractParameterValue",3],[353,"ext","codeunit",2004,"GetLimitTypeOptionFromText",1],[357,"ext","codeunit",501,"AcquireTokensWithCertificate",7]]},{"name":"GetImageAnalysisCredentials","line":375,"kind":"procedure","params":4,"steps":[[386,"ext","codeunit",2200,"GetAzureKeyVaultSecret",2],[402,"call","ExtractParameterValue",3],[403,"call","ExtractParameterValue",3],[404,"call","ExtractParameterValue",3],[405,"call","ExtractParameterValue",3],[407,"ext","codeunit",2004,"GetLimitTypeOptionFromText",1]]}]}