Retrieving data from external resources using external libraries
In this recipe, we will extend Dynamics 365 online to access external resources; more specifically, we will be reading data from a RESTful feed. The results will be retrieved in a JSON format and require an external .NET library to easily manipulate the JSON stream. We will implement the external connection within the account update plugin created in the Creating your first plugin recipe in Chapter 4, Server-Side Extensions.
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...