{"title":"Web services best practices","url":"https://jonas-paprotka.de/docs/dev-itpro/webservices/web-services-best-practices/","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/webservices/web-services-best-practices, 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/webservices/web-services-best-practices","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":"Get the list of recommendations for how to use web services in your Business Central solution.","date":"2024-01-28","meta":{"topic":"best-practice"},"outline":[{"level":2,"title":"Related information","slug":"related-information","at":1956,"chars":122}],"text":"This article provides recommendations that you can implement to make your web services applications faster and easier to understand and maintain.\nRecommendation|Example\nPerformance of web services is both the responsibility of the Business Central server endpoint and the consumer (the client).|Visit the Business Central web services performance tuning guide to learn how to make web services fast and stable. Read more at web-service-performance\nUse the HTTPS protocol to send data between Business Central and the web service consumer. The examples in this section use the HTTP protocol to illustrate the setup, but we recommend that your solution uses transport-level security.|In the application that consumes the Business Central web service, require that URIs are accessed by using HTTPS. For example, a more secure URI for the OData web services on your local computer is `https://localhost:7048/BC230/ODataV4/`.\nUse singular forms of names. This provides meaningful singular entity names in the generated proxy classes.|When publishing page 21, Customer Card, use Customer as the service name instead of Customers or CustomerCard.\nAvoid using spaces and other characters because they're transformed to underscores or other characters that may not be displayed as you want and could lead to ambiguity.|When publishing page 42, Sales Order, remove the space and use SalesOrder as the service name.\nUse Pascal casing when you combine words. Pascal casing capitalizes the first character of each word, including acronyms and initialisms that are more than two letters long.|Use SalesOrder or ContactPerson as the service name.\n> TIP\n> If the same code needs to run both in the UI but also in the background (in a scheduled task or with a job queue entry) or in a web service call (SOAP/OData/API), then use `if GuiAllowed() then` calls to encapsulate AL code that interact with the user. See ../developer/methods-auto/system/system-guiallowed-method.\n## Related information\nWeb Services Overview<web-services>\nWriting fast Web Services<../performance/performance-developer>"}