Posts

Showing posts from September, 2018

Dynamics 365 v9 Virtual Entity using OOB OData v4 Provider - PART 3

Image
In the previous post  Dynamics 365 v9 Virtual Entity using OOB OData v4 Provider - PART 2 , we created the virtual entity Jobs in Dynamics 365. In this post, we are going to run a few testing scenarios with this virtual entity. Viewing, sorting & searching When I created the virtual entity, I ticked the Sales area to display the entity. So navigate to Sales -> Jobs. The home grid will display. Click the column Scheduled Start to sort by ascending. Page 1: Page 2: Sorting works fine for all other columns. Type in Job 14 in grid search text box, and job with Job Name 14 is shown. Query sent to API: $filter=startswith( JobName ,'Job%2028')&$top=25&$select=JobName,ScheduledStart,CustomerId,JobId&$count=true Type in 31/12/2018 in grid search text box, and job with Scheduled Start on that day is shown. Query sent to API: /Jobs?$filter= ScheduledStart ge 2019-01-09T00:00:00Z and ScheduledStart le 2019-01-10T00:00:00Z or star...

Dynamics 365 v9 Virtual Entity using OOB OData v4 Provider - PART 2

Image
In my previous blog  Dynamics 365 v9 Virtual Entity using OOB OData v4 Provider - PART 1 , we created a Web API using OData v4 format. In this blog post, we are going to create the virtual entity in Dynamics 365. Login to Dynamics 365 with system admin role. Go to Settings -> Administration -> Virtual Entity Data Sources. Click + NEW button to create a new data source. As shown above, there are a few things you need to know. URL: the URL to the Web API we deployed in previous post. Pagination Mode: I always select Client-side Paging. The difference between Client-side Paging is described below. Return Inline Count: I always set it to True. The client-side paging won't work if you don't set this to True. With Client-side Paging, the OBB OData v4 Data Provider uses $Skip and $Top parameters in the URL to get the correct records in each of the pages. For example: /Jobs?$top=25&$select=JobName,ScheduledStart,CustomerId,JobId&$count=true Howeve...

Dynamics 365 v9 Virtual Entity using OOB OData v4 Provider - PART 1

Image
Virtual entity is great new way of letting Dynamics 365 users to consume external data in read-only mode. In version 9.0, developers can develop custom data source providers to interact with external data sources rather than using the OOB OData v4 Data Provider. The purpose of this post is to provide some guideline for setting up a virtual entity using the OOB OData v4 Data Provider by connecting it to a custom developed Web Api and see what we can do with the virtual entity in Dynamics 365. So, custom data source provider would be another post for another day. At the time of writing this post, I am using Dynamics 365 version 1710 (9.0.2.2074) online for development and testing. There scenario  We have a list a customers (Accounts) in Dynamics 365, and we record customers' job data in another system. Users would like to see customers' job data in Dynamics 365 rather than open another application to find related jobs. Job Data Model Just for demonstration's sake,...