Consuming a custom service

Custom services are consumed in a way quite similar to any other Dynamics AX service. The difference is that each custom service can have a totally different set of operations, where the system or document services always expose the same list operations.

In this recipe, we will create a .NET console application to demonstrate how to consume a custom service. We will use the service created in the Creating a custom service recipe, which returns a description of the provided currency.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In Visual Studio, create a new Visual C# Console Application project named ConsumeBasicCustomService.
  2. Add a new service reference named CustomCurrencyServices to the ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.