{"title":"Resolving page 6400 and 6401 compilation errors","url":"https://jonas-paprotka.de/docs/dev-itpro/upgrade/resolve-page-6400-6401-error-converting-database/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/resolve-page-6400-6401-error-converting-database, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/resolve-page-6400-6401-error-converting-database","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Explains how to resolve the compilation errors that you get forPage 6400 and 6401 when converting a database from Dynamics NAV to Business Central.","date":"2024-04-18","meta":{"topic":"how-to"},"outline":[{"level":1,"title":"Resolving page 6400 and 6401 compilation errors","slug":"resolving-page-6400-and-6401-compilation-errors","at":0,"chars":2901},{"level":2,"title":"Resolution","slug":"resolution","at":263,"chars":2453},{"level":2,"title":"Related information","slug":"related-information","at":2716,"chars":185}],"text":"# Resolving page 6400 and 6401 compilation errors\nThis article explains how to resolve the compilation error that you get for page 6400 Flow Selector and page 6401 Flow Template Selector when converting a Microsoft Dynamics NAV 2018 database to Business Central.\n## Resolution\nThe resolution requires that you make changes to codeunit 6400, and pages 6400 and 6401.\n1. In codeunit 6400 Flow Service Management, make the following changes:\n 1. Add the following text constants to replace the existing text constant FlowGraphResourceUrlTxt:\n  Name|ConstValue\n  AzureADGraphResourceUrlTxt|https://graph.windows.net\n  MicrosoftGraphResourceUrlTxt|https://graph.microsoft.com\n 2. Change the value of the TemplateFilterTxt text constant to Microsoft Dynamics 365 Business Central.\n 3. Add two global functions, one called GetAzureADGraphhResourceUrl and the other called GetMicrosoftGraphhResourceUrl.\n  These replace the existing function GetFlowGraphResourceUrl.\n  For each function, set the FunctionVisibility property to External and specify a Text type return value.\n  Add the code `EXIT(AzureADGraphResourceUrlTxt)` and `EXIT(MicrosoftGraphResourceUrlTxt);` to the functions as shown:\n  ```\n  [External] GetAzureADGraphhResourceUrl() : Text\n    EXIT(AzureADGraphResourceUrlTxt);\n\n  [External] GetMicrosoftGraphhResourceUrl() : Text\n    EXIT(MicrosoftGraphResourceUrlTxt);\n  ```\n  4. Add a global function called GetTemplateFilter that has a Text type return value, and add the code `EXIT(TemplateFilterTxt)` to the function:\n```al\n      GetTemplateFilter() : Text\n          // Gets the default text value that filters Flow templates when opening page 6400.\n          EXIT(TemplateFilterTxt);\n```\n2. In page 6400 and 6401, in the ControlAddinReady function, replace the following code:\n```al\n    CurrPage.FlowAddin.Initialize(\n      FlowServiceManagement.GetFlowUrl,FlowServiceManagement.GetLocale,\n      AzureAdMgt.GetAccessToken(FlowServiceManagement.GetFlowARMResourceUrl,FlowServiceManagement.GetFlowResourceName,FALSE),\n      AzureAdMgt.GetAccessToken(FlowServiceManagement.GetFlowGraphResourceUrl,FlowServiceManagement.GetFlowResourceName,FALSE));\n```\nWith the following code:\n```al\n    CurrPage.FlowAddin.Initialize(\n            FlowServiceManagement.GetFlowUrl,FlowServiceManagement.GetLocale,\n            AzureAdMgt.GetAccessToken(FlowServiceManagement.GetFlowARMResourceUrl,FlowServiceManagement.GetFlowResourceName,FALSE),\n            AzureAdMgt.GetAccessToken(FlowServiceManagement.GetAzureADGraphhResourceUrl,FlowServiceManagement.GetFlowResourceName,FALSE),\n            AzureAdMgt.GetAccessToken(FlowServiceManagement.GetMicrosoftGraphhResourceUrl,FlowServiceManagement.GetFlowResourceName,FALSE));\n```\n## Related information\nconverting-a-database\nResolving Compilation Errors When Converting a Dynamics NAV 2018 Database<resolve-compile-errors-when-converting-dynamics-nav-2018-database>"}