{"title":"Compiler Information AL0925","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/diagnostics/diagnostic-al925/","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/developer/diagnostics/diagnostic-al925, 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/developer/diagnostics/diagnostic-al925","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":"Interface '{0}' provides a default implementation for method '{1}'.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Compiler Information AL0925","slug":"compiler-information-al0925","at":0,"chars":2939},{"level":2,"title":"Description","slug":"description","at":495,"chars":212},{"level":2,"title":"Remarks","slug":"remarks","at":707,"chars":539},{"level":2,"title":"How to fix it","slug":"how-to-fix-it","at":1246,"chars":227},{"level":2,"title":"Example of code that triggers AL0925","slug":"example-of-code-that-triggers-al0925","at":1473,"chars":640},{"level":2,"title":"Example of how to fix it","slug":"example-of-how-to-fix-it","at":2113,"chars":642},{"level":2,"title":"Related information","slug":"related-information","at":2755,"chars":184}],"text":"# Compiler Information AL0925\n> NOTE\n> The AL diagnostics topics are in preview. If you have input for this topic, we'd love to hear from you. Use our GitHub repo to create a PR and add content to this topic by going to https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb. To read about contributing, see Contribute to the Help<../../help/contributor-guide#contributing>. Thanks!\nInterface '{0}' provides a default implementation for method '{1}'. Override it to customize the behavior.\n## Description\nAn interface method has a default implementation and is not implemented by the codeunit. You can override it to provide a custom implementation. Implement it to avoid missing out on a new feature.\n## Remarks\nWhen an interface method has a default implementation (a body), implementing codeunits are not required to override it. The default implementation is used as a fallback. This informational diagnostic lets you know that optional methods exist and provides an opportunity to override them with custom behavior tailored to your needs.\nThis diagnostic has Information severity and does not prevent compilation. It serves as a notification to help implementors discover new optional functionality added to interfaces they implement.\n## How to fix it\nIf you want to provide custom behavior, add an explicit implementation of the method in your codeunit. If the default behavior is sufficient, you can safely ignore this diagnostic or suppress it with a pragma.\n## Example of code that triggers AL0925\nGiven an interface in a dependency module:\n```al\ninterface ILogger\n{\n    procedure LogError(message: Text);\n\n    procedure LogWarning(message: Text);\n    begin\n        // Default: treat warnings as errors\n        LogError(message);\n    end;\n}\n```\nThe following codeunit triggers AL0925 because it does not override LogWarning:\n```al\ncodeunit 50100 MyLogger implements ILogger\n{\n    procedure LogError(message: Text);\n    begin\n        // Error logging logic\n    end;\n\n    // Info AL0925: ILogger defines optional method 'LogWarning' with a default\n    // implementation that is not overridden.\n}\n```\n## Example of how to fix it\nOverride the optional method to provide custom behavior.\n```al\ncodeunit 50100 MyLogger implements ILogger\n{\n    procedure LogError(message: Text);\n    begin\n        // Error logging logic\n    end;\n\n    procedure LogWarning(message: Text);\n    begin\n        // Custom warning logging logic - separate from errors\n    end;\n}\n```\nAlternatively, if the default behavior is acceptable, suppress the diagnostic:\n```al\n#pragma warning disable AL0925\ncodeunit 50100 MyLogger implements ILogger\n#pragma warning restore AL0925\n{\n    procedure LogError(message: Text);\n    begin\n        // Error logging logic\n    end;\n}\n```\n## Related information\nGetting started with AL<../devenv-get-started>\nDeveloping extensions<../devenv-dev-overview>\n../devenv-interfaces-in-al\nCompiler Warning AL0924<diagnostic-al924>"}