Getting ready

For this recipe, you will need access to a publicly available RESTful service of your choice. We will be using the freely available service at https://jsonplaceholder.typicode.com.

In order to easily manipulate the JSON results, we will use an external library called Json.NET by Newtonsoft. The library provides serialization, deserialization, and parsing capabilities between JSON and .NET objects. This lightweight library will save us a significant amount of unnecessary development. For more details about Json.NET visit http://www.newtonsoft.com/json.

Given that Dynamics 365 online only allows database plugin deployments and that we are using an external .NET library, we will need to merge the external library with our plugin assembly. ILMerge (https://www.microsoft.com/download/details.aspx?id=17630) is a well-known utility that can merge several .NET assemblies into one.

Since our code will log the results using the Dynamics 365 tracing capabilities, you need to ensure that your plugin verbose tracing is enabled. Check out the Debugging your plugin in Dynamics 365 Online recipe of Chapter 4, Server-Side Extensions for details.

Finally, given that we will be deploying an updated plugin, you will need the System Customizer or higher role within Dynamics 365. To run the code, we also need the correct privileges to access and update an account. The plugin will trigger when the account name is updated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset