D365 FO OData proxy generation
To create the D365 FinOps C# OData Proxy do:
1. Install the following plugin
https://marketplace.visualstudio.com/items?itemName=Unchase.unchaseodataconnectedservice
2. Using a Visual Studio Standard Library project and add a new ‘Connected Service’
3. Open the Reference.cs file in VS Code (VS Code seems to handle the file better than Notepad++ and Visual Studio)
4. Search for the EDMX mega string in the file
private const string Edmx = @”[mega big xml string we need to change]”
5. Cut the EDMX mega string and place in a file on disk call edmx.xml on disk. Change “” to “
Set this to be file to be embedded content in your Visual Studio project
5. Search for the below function name and replace with the code below:
6. Now create your own proxy wrapper with authentication using:
7. Sample unit test to create a sales order
Published: