Create a Custom Service In D365
Unlike calling a Data Entity which can create or retrieve data from tables, services allow us to run code within Microsoft Dynamics 365. This is very useful if for example you need to retrieve a value that is not stored in a table. Or you would like to run a process, and return whether it was successful or not. See blog post: https://dynamics365musings.com/create-a-custom-service-in-d365/