{"title":"Codeunit 2012 Entity Text Impl., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/2012-entity-text-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-11-19","object":{"type":"codeunit","id":2012,"name":"Entity Text Impl.","app":"System Application","url":"https://jonas-paprotka.de/ref/codeunit/2012-entity-text-impl/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/2012-entity-text-impl/source/","path":"src/System Application/App/Entity Text/src/EntityTextImpl.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:7771":{"name":"Azure OpenAI","url":"https://jonas-paprotka.de/ref/codeunit/7771-azure-openai/"},"codeunit:2011":{"name":"Entity Text AOAI Settings","url":"https://jonas-paprotka.de/ref/codeunit/2011-entity-text-aoai-settings/"},"codeunit:2016":{"name":"Entity Text Prompts","url":"https://jonas-paprotka.de/ref/codeunit/2016-entity-text-prompts/"},"table:2000000132":{"name":"Entity Text","url":"https://jonas-paprotka.de/ref/table/2000000132-entity-text/"},"codeunit:3960":{"name":"Regex","url":"https://jonas-paprotka.de/ref/codeunit/3960-regex/"},"codeunit:2018":{"name":"Magic Function","url":"https://jonas-paprotka.de/ref/codeunit/2018-magic-function/"},"table:3965":{"name":"Matches","url":"https://jonas-paprotka.de/ref/table/3965-matches/"},"codeunit:7768":{"name":"AOAI Deployments","url":"https://jonas-paprotka.de/ref/codeunit/7768-aoai-deployments/"},"codeunit:8703":{"name":"Feature Telemetry","url":"https://jonas-paprotka.de/ref/codeunit/8703-feature-telemetry/"},"codeunit:7761":{"name":"AOAI Chat Completion Params","url":"https://jonas-paprotka.de/ref/codeunit/7761-aoai-chat-completion-params/"},"codeunit:7763":{"name":"AOAI Chat Messages","url":"https://jonas-paprotka.de/ref/codeunit/7763-aoai-chat-messages/"},"codeunit:2017":{"name":"Generate Prod Mkt Ad Function","url":"https://jonas-paprotka.de/ref/codeunit/2017-generate-prod-mkt-ad-function/"},"codeunit:7770":{"name":"AOAI Operation Response","url":"https://jonas-paprotka.de/ref/codeunit/7770-aoai-operation-response/"},"codeunit:7758":{"name":"AOAI Function Response","url":"https://jonas-paprotka.de/ref/codeunit/7758-aoai-function-response/"}},"procs":[{"name":"IsEnabled","line":25,"kind":"procedure","params":1,"steps":[[29,"ext","codeunit",7771,"IsEnabled",2]]},{"name":"CanSuggest","line":37,"kind":"procedure","params":0,"steps":[[42,"ext","codeunit",2011,"IsEnabled",1],[45,"ext","codeunit",2016,"HasPromptInfo",0]]},{"name":"GenerateSuggestion","line":49,"kind":"procedure","params":5,"steps":[[58,"call","IsEnabled",1],[60,"call","CanSuggest",0],[63,"call","BuildFacts",3],[64,"ext","codeunit",2016,"BuildPrompts",7],[66,"call","GetFeatureName",0],[68,"call","GenerateAndReviewCompletion",5]]},{"name":"InsertSuggestion","line":80,"kind":"procedure","params":5,"steps":[[87,"call","SetText",2],[89,"write",2000000132,"Insert"],[90,"write",2000000132,"Modify"],[92,"call","GetFeatureName",0]]},{"name":"SetText","line":95,"kind":"procedure","params":2,"steps":[[109,"ext","codeunit",3960,"Replace",3],[111,"ext","codeunit",3960,"Replace",3]]},{"name":"BuildFacts","line":154,"kind":"procedure","access":"local","params":3,"steps":[[178,"call","GetFeatureName",0]]},{"name":"GenerateAndReviewCompletion","line":199,"kind":"procedure","access":"local","params":5,"steps":[[209,"call","GenerateCompletion",4],[211,"call","CompletionContainsPrompt",2],[211,"call","IsGoodCompletion",3],[215,"call","GetFeatureName",0],[219,"call","GetFeatureName",0],[221,"ext","codeunit",2018,"Execute",1]]},{"name":"CompletionContainsPrompt","line":225,"kind":"procedure","access":"local","params":2,"steps":[[238,"call","GetFeatureName",0]]},{"name":"IsGoodCompletion","line":247,"kind":"procedure","access":"local","params":3,"steps":[[259,"call","GetFeatureName",0],[264,"call","GetFeatureName",0],[283,"call","GetFeatureName",0],[288,"ext","codeunit",3960,"Match",3],[293,"ext","table",3965,"ReadValue",0],[306,"call","GetFeatureName",0],[312,"call","GetFeatureName",0]]},{"name":"GenerateCompletion","line":320,"kind":"procedure","access":"local","params":4,"steps":[[343,"ext","codeunit",7771,"SetAuthorization",4],[346,"ext","codeunit",7771,"SetAuthorization",2],[346,"ext","codeunit",7768,"GetGPT56CeresLatest",0],[350,"ext","codeunit",8703,"LogError",6],[350,"call","GetFeatureName",0],[354,"ext","codeunit",7771,"SetCopilotCapability",1],[356,"ext","codeunit",7761,"SetMaxTokens",1],[357,"ext","codeunit",7761,"SetTemperature",1],[359,"ext","codeunit",7763,"AddTool",1],[361,"ext","codeunit",2017,"SetTextFormat",1],[362,"ext","codeunit",7763,"AddTool",1],[363,"ext","codeunit",7763,"SetToolChoice",0],[365,"ext","codeunit",7763,"SetPrimarySystemMessage",1],[366,"ext","codeunit",7763,"AddUserMessage",1],[369,"ext","codeunit",7771,"GenerateChatCompletion",3],[373,"ext","codeunit",7770,"IsSuccess",0],[374,"ext","codeunit",7770,"IsFunctionCall",0],[375,"ext","codeunit",7770,"GetFunctionResponses",0],[376,"ext","codeunit",8703,"LogUsage",4],[376,"call","GetFeatureName",0],[379,"ext","codeunit",7758,"IsSuccess",0],[380,"ext","codeunit",8703,"LogError",6],[380,"call","GetFeatureName",0],[384,"ext","codeunit",7758,"GetResult",0],[386,"ext","codeunit",7758,"GetFunctionName",0],[386,"ext","codeunit",2018,"GetName",0],[391,"ext","codeunit",8703,"LogError",6],[391,"call","GetFeatureName",0],[395,"ext","codeunit",8703,"LogError",6],[395,"call","GetFeatureName",0],[395,"ext","codeunit",7770,"GetStatusCode",0],[398,"ext","codeunit",2011,"ContainsWordsInDenyList",1]]}]}